Prop | Default | Type |
---|---|---|
as | 'div' | AsTag | Component The element or component this component should render as. Can be overwritten by |
asChild | boolean Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. | |
by | string | ((a: AcceptableValue, b: AcceptableValue) => boolean) Use this to compare objects by a particular field, or pass your own comparison function for complete control over how objects are compared. | |
defaultOpen | boolean The open state of the combobox when it is initially rendered. | |
defaultValue | AcceptableValue | AcceptableValue[] The value of the listbox when initially rendered. Use when you do not need to control the state of the Listbox | |
dir | 'ltr' | 'rtl' The reading direction of the listbox when applicable. | |
disabled | boolean When | |
highlightOnHover | boolean When | |
ignoreFilter | boolean When | |
modelValue | AcceptableValue | AcceptableValue[] The controlled value of the listbox. Can be binded with with | |
multiple | boolean Whether multiple options can be selected or not. | |
name | string The name of the field. Submitted with its owning form as part of a name/value pair. | |
open | boolean The controlled open state of the Combobox. Can be binded with with | |
openOnClick | false | boolean Whether to open the combobox when the input is clicked |
openOnFocus | false | boolean Whether to open the combobox when the input is focused |
required | boolean When | |
resetSearchTermOnBlur | true | boolean Whether to reset the searchTerm when the Combobox input blurred |
resetSearchTermOnSelect | true | boolean Whether to reset the searchTerm when the Combobox value is selected |
Emit | Payload |
---|---|
highlight | [payload: { ref: HTMLElement; value: AcceptableValue; }] Event handler when highlighted element changes. |
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. |
Slots (default) | Payload |
---|---|
open | boolean Current open state |
modelValue | AcceptableValue | AcceptableValue[] Current active value |