Update Autocomplete TypeScript declaration file and readme with key callbacks
parent
2c92c37080
commit
b79c3da04d
|
@ -88,6 +88,14 @@ export interface AutocompleteProps extends InputProps {
|
|||
* Callback function that is fired when component is focused.
|
||||
*/
|
||||
onFocus?: Function;
|
||||
/**
|
||||
* Callback function that is fired when a key is pressed down.
|
||||
*/
|
||||
onKeyDown?: Function;
|
||||
/**
|
||||
* Callback function that is fired when a key is lifted up.
|
||||
*/
|
||||
onKeyUp?: Function;
|
||||
/**
|
||||
* Callback function that is fired when the components's query value changes.
|
||||
*/
|
||||
|
|
|
@ -53,8 +53,10 @@ If you want to provide a theme via context, the component key is `RTAutocomplete
|
|||
| `multiple` | `Bool` | `true` | If true, component can hold multiple values. |
|
||||
| `onBlur` | `Function` | | Callback function that is fired when component is blurred. |
|
||||
| `onChange` | `Function` | | Callback function that is fired when the components's value changes. |
|
||||
| `onQueryChange` | `Function` | | Callback function that is fired when the components's query input value changes. |
|
||||
| `onFocus` | `Function` | | Callback function that is fired when component is focused. |
|
||||
| `onKeyDown` | `Function` | | Callback function that is fired when a key is pressed down. |
|
||||
| `onKeyUp` | `Function` | | Callback function that is fired when a key is lifted up. |
|
||||
| `onQueryChange` | `Function` | | Callback function that is fired when the components's query input value changes. |
|
||||
| `query` | `String` | | This property has to be used in case the `source` is not static and will be changing during search for `multiple={false}` autocomplete, content of the `query` has to be managed by the `onQueryChange` callback. |
|
||||
| `source` | `Object` or `Array` | | Object of key/values or array representing all items suggested. |
|
||||
| `selectedPosition` | `String` | `above` | Determines if the selected list is shown above or below input. It can be `above`, `below` or `none`. |
|
||||
|
|
Loading…
Reference in New Issue