Data and Value Binding

The MultiSelect enables you to configure its predefined list of options and selected values.

To set the predefined option list, use the data property. To set the selected values, use the value property.

The MultiSelect Component is part of Kendo UI for Vue, a professionally built commercial UI library. To try out this MultiSelect you need to sign up for a 30-day trial, which gives you access to the full Kendo UI for Vue library.


Data Binding

To bind the MultiSelect to data, use the data property of the component.

The data property accepts both:

Arrays of Primitive Values

The following example demonstrates how to bind the MultiSelect to an array of primitive values.

Example
View Source
Edit In Stackblitz  
Change Theme:

Datasets of Objects

If the MultiSelect is bound to a dataset of objects, the textField property needs to be set and the value of the component will be an array of the selected objects.

By default, the MultiSelect compares the items by reference. To specify a field from the data object which will be used for the comparison, utilize the dataItemKey property. The dataItemKey property is useful when the references to the selected items which are configured in the value or defaultValue property do not match their corresponding items from the data collection. If dataItemKey is not set and the references in data and value do not correspond, the selected items will not be highlighted in the drop-down list.

Example
View Source
Edit In Stackblitz  
Change Theme:

Value Binding

To render the selected values, use the value property of the MultiSelect. If you set the value through the value property, hook up to the onChange event and manually update the value of the value property.

Example
View Source
Edit In Stackblitz  
Change Theme: