The debounce time represents the time taken in between a key stroke in the input field and the search taking place. If the debounce time is 1 second, then a search will only take place if there has been no keyboard inputs for 1 second. For a larger list of items this might help improve performance, since it avoids too many searches from happening.
Hide label. The hidden label is still available to screen readers.
selected
:
A writable store that can be used to get or update the selected item.
items
:
Pass the list of items that are available as options. Individual items can be disabled. Check the ComboboxItem type for more details.
defaultSelected
:
| null
=
null
Set the default selected item.
multiple
:
boolean
=
false
Whether or not to allow multiple items being selected.
placeholder
:
string
=
''
Set the input placeholder.
preventScroll
:
boolean
=
false
Whether or not to prevent scrolling of the document when the combobox is open.
noResultsMessage
:
string
=
'No results found'
Set the message that shows when no result is returned from a search.
defaultOpen
:
boolean
=
false
Whether the combobox is open by default or not.
loop
:
boolean
=
false
Whether or not the focus should loop back to the first item when the last item is reached.
debounce
:
number
=
0
The debounce time in milliseconds for the input value. This represents the time taken
in between a key stroke in the input field and the search taking place. For a larger list
of items it might improve performance to increase the debounce time, to avoid too many searches.