Dynamically change data
You can manipulate the used data dynamically, either by changing the data
property or during user events like on_type
or on_focus
. The following properties and methods are there to use:
Methods
updateData
replace all data entries.emptyData
remove all data entries.setInputValue
update the input value.showIndicator
shows a progress indicator instead of the icon (inside the input).hideIndicator
hides the progress indicator inside the input.showIndicatorItem
shows an item with a ProgressIndicator status as an data option item.showNoOptionsItem
shows the "no entries found" status as an data option item.setVisible
shows the DrawerList.setHidden
hides the DrawerList.showAllItems
shows all DrawerList items.setMode
switch the mode during runtime.debounce
a debounce method with a cancel invocation method on repeating calls. There is more documentation about this method.
Properties
dataList
contains all the data entries
Example
<Autocompleteon_focus={({ updateData, showIndicator }) => {showIndicator()setTimeout(() => {updateData(topMovies)}, 1e3)}}on_type={({ value /* updateData, ... */ }) => {console.log('on_type', value)}}/>