SingleSelect

disabled

value is the selected object

{ "display": "Pasta", "id": "pasta" }

With explicit :option-key, result is the key value not the object:

falafel

No initial value

Without dropdown icon

Usage

API

Props

PropTypeDefaultDescription
v-modelAny-Selected value (object or key value)
optionsArray[]Array of option objects
optionLabelString"label"Property name for display text
optionKeyString""Property name for value. If set, v-model is key, not object
placeholderString"Select"Placeholder when nothing selected
disabledBooleanfalseDisable the select
searchThresholdNumberInfinityShow search filter when options exceed this count
showDropdownBooleantrueShow dropdown chevron icon
requiredBooleanfalseRequired for form validation

Events

EventPayloadDescription
selectvalueEmitted when selection changes
close-Emitted when dropdown closes

Option Properties

PropertyTypeDescription
[optionLabel]StringDisplay text
[optionKey]AnyUnique identifier
iconStringFontAwesome icon class
disabledBooleanDisable this option
separatorBooleanRender as separator