A searchable select dropdown.
Props
Name
Description
Type
Default
chevronIcon
Icon to use as a chevron.
[namespace: stringor
symbol, name: string]or
string
[ICON_NAMESPACE, chevron]
disabled
If the field is disabled.
booleanor
undefined
inputProps
Pass props directly to the input.
undefinedor
{ [x: string]: any; }
invalid
If the field is currently in an error state.
booleanor
undefined
label
The label of the field.
string
messages
The validation messages of the field
ValidationMessagesor
undefined
name
The name of the field.
string
optionFilter
Pass a custom search filter function
((filter: string, option: TypeaheadOption) => boolean)or
undefined
options
A list of options to choose from.
TypeaheadOption[]
placeholder
The placeholder for the input.
stringor
undefined
readonly
If the field is editable.
booleanor
undefined
renderOption
Overwrite the default option renderer.
((h: typeof h, option: any, chosen: boolean) => stringor
VNodeor
VNode[]or
null)or
undefined
renderValue
Overwrite the default value renderer.
(h: typeof h, value: any, rawValue: string) => stringor
VNodeor
VNode[]or
null
(_, o, v) => o?.name ?? v
value
The current value of the field.
nullor
string
ValidationMessages
Name
Description
Type
TypeaheadOption
An option to be selected.
Name
Description
Type
The display name of the option.
The string to be used as a value.
Events
Event
Detail
Description
fieldchange
FieldChange<string | null>
Emitted when the value of the field is changed.
Parts
Name
Description
input
The wrapping div of the input.
true_input
The input element.