| Prop | Default | Type |
|---|---|---|
as | 'div' | AsTag | ComponentThe element or component this component should render as. Can be overwritten by |
asChild | booleanChange the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. | |
defaultOpen | booleanThe open state of the combobox when it is initially rendered. | |
defaultValue | AcceptableValue | AcceptableValue[]The value of the combobox when initially rendered. Use when you do not need to control the state of the Combobox | |
dir | 'ltr' | 'rtl'The reading direction of the combobox when applicable. | |
disabled | booleanWhen | |
displayValue | ((val: AcceptableValue) => string)The display value of input for selected item. Does not work with | |
filterFunction | ((val: string[] | number[] | false[] | true[] | Record<string, any>[], term: string) => string[] | number[] | false[] | true[] | Record<string, any>[])The custom filter function for filtering | |
modelValue | AcceptableValue | AcceptableValue[]The controlled value of the Combobox. Can be binded with with | |
multiple | booleanWhether multiple options can be selected or not. | |
name | stringThe name of the Combobox. Submitted with its owning form as part of a name/value pair. | |
open | booleanThe controlled open state of the Combobox. Can be binded with with | |
resetSearchTermOnBlur | true | booleanWhether to reset the searchTerm when the Combobox input blurred |
resetSearchTermOnSelect | true | booleanWhether to reset the searchTerm when the Combobox value is selected |
searchTerm | stringThe controlled search term of the Combobox. Can be binded with with v-model:searchTerm. | |
selectedValue | AcceptableValueThe current highlighted value of the COmbobox. Can be binded with |
| Emit | Payload |
|---|---|
update:modelValue | [value: AcceptableValue]Event handler called when the value changes. |
update:open | [value: boolean]Event handler called when the open state of the combobox changes. |
update:searchTerm | [value: string]Event handler called when the searchTerm of the combobox changes. |
update:selectedValue | [value: AcceptableValue]Event handler called when the highlighted value of the combobox changes |
| Slots (default) | Payload |
|---|---|
open | booleanCurrent open state |
modelValue | AcceptableValue | AcceptableValue[]Current active value |