Theme:
Ui3nAutocomplete
Props
| Name | Type | Default value | Description |
|---|---|---|---|
chips | boolean | undefined | Whether to show chips | |
clearOnSelect | boolean | undefined | false | Whether to clear input on select |
customFilter | ((value: T, query: string) => boolean) | undefined | Custom filter function | |
disabled | boolean | undefined | Whether autocomplete is disabled | |
filterKeys | string[] | undefined | [] | Filter keys |
hideSelected | boolean | undefined | false | Whether to hide selected items |
items * | T[] | [] | Items to display |
itemTitle | keyof T | undefined | "name" | Property to use as title |
itemValue | keyof T | undefined | "id" | Property to use as value |
modelValue * | T[] | T[keyof T][] | Current autocomplete value | |
addNewValue | boolean | undefined | Whether to allow adding new values | |
newValueValidator | ((value: string) => boolean) | undefined | New value validator function | |
multiple | boolean | undefined | Whether to allow multiple selection | |
noDataText | string | undefined | Text to show when no data | |
placeholder | string | undefined | Placeholder text | |
returnObject | boolean | undefined | Whether to return the whole object or just the value |
Events
| Event | Value type | Description |
|---|---|---|
update:modelValue | T[] | T[keyof T][] | Emitted when model value updates |
update:search | string | Emitted when search value updates |
update:focused | boolean | Emitted when focused state updates |
valid:new-value | boolean | Emitted when new value validation status updates |
Slots
| Name | Props | Description |
|---|---|---|
item | { item: T; index: number; query?: string | undefined; } | Item slot |
chip | { item: T | T[keyof T]; index: number; } | Chip slot |
noDataText | No data text slot | |
selection | { value: T[] | T[keyof T][]; } | Selection slot |