@serenity-is/corelib / ComboboxOptions
Interface: ComboboxOptions<TSource>
Defined in: src/ui/editors/combobox.ts:59
Options for the Combobox.
Type Parameters
TSource
TSource = any
The source item type.
Properties
allowClear?
optionalallowClear:boolean
Defined in: src/ui/editors/combobox.ts:61
Whether the selection can be cleared.
arbitraryValues?
optionalarbitraryValues:boolean
Defined in: src/ui/editors/combobox.ts:67
Allow arbitrary values for items.
createSearchChoice()?
optionalcreateSearchChoice: (s) =>ComboboxItem<TSource>
Defined in: src/ui/editors/combobox.ts:63
Callback that creates a search choice for arbitrary values.
Parameters
s
string
Returns
ComboboxItem<TSource>
element?
optionalelement:HTMLInputElement|HTMLSelectElement|Element[]
Defined in: src/ui/editors/combobox.ts:65
The element to attach the combobox to.
formatResult()?
optionalformatResult: (p1) =>ComboboxFormatResult
Defined in: src/ui/editors/combobox.ts:71
Formatter for result items.
Parameters
p1
ComboboxItem<TSource>
Returns
formatSelection()?
optionalformatSelection: (p1) =>ComboboxFormatResult
Defined in: src/ui/editors/combobox.ts:69
Formatter for the selected item.
Parameters
p1
ComboboxItem<TSource>
Returns
minimumResultsForSearch?
optionalminimumResultsForSearch:number
Defined in: src/ui/editors/combobox.ts:73
Minimum results required to show the search box.
multiple?
optionalmultiple:boolean
Defined in: src/ui/editors/combobox.ts:75
Whether multiple items can be selected.
pageSize?
optionalpageSize:number
Defined in: src/ui/editors/combobox.ts:77
Page size to use while loading or displaying results.
placeholder?
optionalplaceholder:string
Defined in: src/ui/editors/combobox.ts:79
Placeholder text.
providerOptions()?
optionalproviderOptions: (type,opt) =>any
Defined in: src/ui/editors/combobox.ts:81
Callback to get options specific to the combobox provider type.
Parameters
type
"select2"
opt
ComboboxOptions
Returns
any
search()?
optionalsearch: (query) =>ComboboxSearchResult<ComboboxItem<TSource>> |PromiseLike<ComboboxSearchResult<ComboboxItem<TSource>>>
Defined in: src/ui/editors/combobox.ts:83
Callback that performs the search.
Parameters
query
Returns
ComboboxSearchResult<ComboboxItem<TSource>> | PromiseLike<ComboboxSearchResult<ComboboxItem<TSource>>>
typeDelay?
optionaltypeDelay:number
Defined in: src/ui/editors/combobox.ts:85
Type delay for searching, default is 200.