EListbox Listbox
Examples
Single selection
Multiple selection
Filter options
Keyboard navigation
Custom option
Properties
modelvarPrimitive values or option objects with label, value, and disabled.
[]valuesvarSelected values when multiple is true.
[]valuevarSelected value in single selection mode.
nullmultipleboolAllow multiple selection.
falsefilterableboolAllow keyword filtering.
falsereorderableboolAllow entries to be reordered.
falselabelKeystringField name used as the label in object models.
"label"valueKeystringOption value field or unique identifier for object values.
"value"itemDelegateComponentCustom option content; read data from parent.optionData.
nullfilterTextaliasText used to filter visible entries.
search.textviewaliasRead onlyUnderlying ListView instance.
listitemsvarRead onlyVisible entries derived from the model and filter.
Show default value
Array.isArray(model) ? model.map(function(item, index) { const object = item && typeof item === "object" return {raw: item, index: index, label: String(object ? item[labelKey] === undefined ? "" : item[labelKey] : item), value: object ? item[valueKey] === undefined ? item : item[valueKey] : item, disabled: !!(object && item.disabled)} }).filter(function(item) { return item.label.toLowerCase().indexOf(search.text.toLowerCase()) >= 0 }) : []Signals
changed(var value)Emitted when the selection changes; value is the new value.
itemClicked(var item, int index)Emitted when a list item is clicked; item is its data and index is its zero-based index.
reorderRequested(int from, int to)Emitted when reordering is requested; from and to are the old and new indices. Update the data order in the application.
Methods
isSelected(option)Return whether the option identified by the given key is selected.
select(index)Select the item identified by the given index or key.