AsyncAutocomplete
Autocomplete in different time and space.
Example
Props
đšī¸ standard props
items Item[]
List of selectable items.
[]values Item[]
Selected items.
[]multiple boolean
Allow multiple selections.
falsesearcher (params: { searchText: string }) => Promise<Item[]>
Function to fetch items based on search text.
placeholder string
Placeholder text.
undefinedsearchThreshold number
Minimum search text length before triggering search.
2debounceTimeout number
Debounce time for search input.
500searching boolean
Indicates if search is in progress.
falsesearch boolean
Trigger search manually.
falsesearchText string
Current search text.
undefinedmaxVisibleChips number
Maximum number of visible selected items.
undefinedmenuOpened boolean
Controls menu visibility.
falsemobileDrawer boolean
Enable mobile-friendly drawer mode.
falsecloseOnSelect boolean
Close menu when item is selected.
falsedisabled boolean
Disable input.
falsemenuWidth string | null
The width of the menu.
nullmenuAnchor "bottom" | "bottom-center" | "right-center"
The anchor of the menu.
đ¨ style props
Slots
chipLabelSnippet
Renders the label inside each chip.
Default content:
{selection.label}Available variables:
| Name | Type | Description |
|---|---|---|
selection | ItemData | The selected item. |
itemLabelSnippet
Renders the label of an item.
Default content:
{item.label}Available variables:
| Name | Type | Description |
|---|---|---|
item | ItemData | The item to render the label for. |
Events
onchange
Fired when the selection changes.
| Attribute | Type | Description |
|---|---|---|
| unselect | ItemData | undefined | The item that was unselected. |
| select | ItemData | undefined | The item that was selected. |
| selection | ItemData[] | The current selection of items. |