Skip to content
On this page

NcMultiselect

Props

Prop nameDescriptionTypeValuesDefault
value-function() {
return []
}
closeOnSelectClose the Multiselect when selecting an item.
Will be overwritten by !multiple if undefined.
boolean-undefined
multipleAllow multiple select ?boolean-false
limitLimit the number of resultsnumber-99999
labelkey to use as label on object optionsstring-''
trackBykey to use as id on object optionsstring-''
optionsArray of available options: Objects, Strings or Integers.
If array of objects, visible label will default to option.label.
If labal prop is passed, label will equal option['label']
array-
userSelectEnable the big user selector w/ avatar
Make sure your objects fit the requirements
boolean-false
loadingOverriding the default slot. Only showing a spiner.boolean-false
autoLimitEnable the automatic limit and width calculation
Only works on multiple
boolean-true
tagWidthIf autoLimit, allow to specify the min-width of every
selected option when calculating the number of options
to show. This needs to be a positive integer.
number-150

Events

Event namePropertiesDescription
change
update:value

Slots

NameDescriptionBindings
option
slot
noResult

NcMultiselect

status

Use NcSelect instead


We're wrapping the awesome vue-multiselect library to add our own styling and default props/methods You can use all the properties from https://vue-multiselect.js.org that are not declared/overrided here.

Simple examples

loading...

Simple example with objects

You can either use the exact object or the track-by key to match against your options

loading...

Limit with automated tooltip

loading...

User layout

By specifying :user-select="true", you can benefit from a fully formatted layout. The singleLabel slot here is optional of course and here for demonstration purposes The NcListItemIcon title will be provided by the option key refering to the label prop. Example here: displayName

Note: Any extra binding from the object will be added as attribute ($attrs) on the NcListItemIcon component used here

loading...