Dynamically change data
You can manipulate the used data dynamically, either by changing the data property or during user events like onType or onFocus. The following properties and methods are there to use:
Methods
updateDatareplace all data entries.emptyDataremove all data entries.resetSelectedItemwill invalidate the selected key.revalidateSelectedItemwill re-validate the internal selected key on the givenvalue.revalidateInputValuewill re-validate the current input value and update it – based on the givenvalue.setInputValueupdate the input value.clearInputValuewill set the current input value to an empty string.focusInputwill set focus on the input element.showIndicatorshows a progress indicator instead of the icon (inside the input).hideIndicatorhides the progress indicator inside the input.showIndicatorItemshows an item with a ProgressIndicator status as an data option item.showNoOptionsItemshows the "no entries found" status as an data option item.setVisibleshows the DrawerList.setHiddenhides the DrawerList.showAllItemsshows all DrawerList items.setModeswitch the mode during runtime.debouncea debounce method with a cancel invocation method on repeating calls. There is more documentation about this method.
Properties
dataListcontains all the data entries.
Example
<AutocompleteonFocus={({ updateData, showIndicator }) => {showIndicator()setTimeout(() => {updateData(topMovies)}, 1e3)}}onType={({ value /* updateData, ... */ }) => {console.log('onType', value)}}/>