react-autocompleter
Advanced tools
Comparing version 1.0.8 to 1.0.9
{ | ||
"name": "react-autocompleter", | ||
"author": "Invertase", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "A simple, configurable, styleable ReactJS component which completes your phrase with keyboard navigation support.", | ||
@@ -9,4 +9,4 @@ "main": "./dist/AutoCompleter.js", | ||
"react", | ||
"react-component", | ||
"ui", | ||
"user", | ||
"typeahead", | ||
@@ -13,0 +13,0 @@ "autocomplete" |
@@ -152,3 +152,3 @@ # React AutoCompleter | ||
Triggered on input change, including the navigated and selected value. | ||
Triggered on input change, including the navigated value. | ||
@@ -172,2 +172,12 @@ ``` | ||
### Handling `onChange` & `onSelect` | ||
Since clicking a filtered item does not trigger `onChange`, the item is passed as the callback on the `onSelect` function. There might be a case where your `onSelect` function needs to handle both the state value and the callback value: | ||
``` | ||
selected = (value) => { | ||
const input = !value ? this.state.url : value; | ||
} | ||
``` | ||
### Browser Autofill | ||
@@ -174,0 +184,0 @@ |
25771
203