MultiSelectComponent
Represents the Kendo UI MultiSelect component for Angular.
Use the MultiSelectComponent
to show a dropdown list where users can select multiple items.
See example.
@Component({
selector: 'my-app',
template: `
<kendo-multiselect
[data]="listItems"
textField="name"
valueField="id"
placeholder="Select items...">
</kendo-multiselect>
`
})
export class AppComponent {
public listItems = [
{ id: 1, name: "Item 1" },
{ id: 2, name: "Item 2" },
{ id: 3, name: "Item 3" }
];
}
Selector
kendo-multiselect
Export Name
Accessible in templates as #kendoMultiSelectInstance="kendoMultiSelect"
Inputs
Name | Type | Default | Description |
---|---|---|---|
adaptiveMode |
|
|
Controls the adaptive mode behavior of the component.
Set to |
adaptiveSubtitle |
|
Sets the subtitle text for the ActionSheet in adaptive mode. No subtitle appears by default. | |
adaptiveTitle |
|
Sets the title text for the ActionSheet in adaptive mode. Uses the component's label text by default. | |
allowCustom |
|
|
Allows users to add custom values not present in the data source.
Set to |
autoClose |
|
|
Controls whether the options list closes after item selection finishes (see example).
Set to |
checkboxes |
|
|
Controls whether checkboxes appear before each item in the popup list.
Pass |
clearButton |
|
|
Controls whether a clear button appears when items are selected.
Set to |
data |
|
Sets the data source for the MultiSelect. Provide the data as an array of items. | |
disabled |
|
|
Controls the disabled state of the component. When true, sets the component to disabled. To learn how to disable the component in reactive forms, refer to the article on Forms Support. |
fillMode |
|
|
Sets the fill mode of the component. |
filterable |
|
|
Enables the filtering functionality of the MultiSelect.
Set to |
inputAttributes |
|
Sets HTML attributes for the inner input element. You cannot change attributes essential for component functionality. | |
itemDisabled |
|
Determines wether the item will be disabled. The function is executed for each data item.
The function receives the item as an argument and should return | |
listHeight |
|
|
Sets the height of the options list in the popup. This affects only the list height, not the entire popup container. |
loading |
|
Controls the loading state of the MultiSelect.
Set to | |
placeholder |
|
Sets the placeholder text for the MultiSelect input. When the values are selected, it disappears. | |
popupSettings |
|
Configures the popup appearance and behavior.
Set properties like | |
readonly |
|
|
Controls the read-only state of the component. When true, the component does not allow user input or selection changes. |
rounded |
|
|
Sets the border radius of the component. |
showStickyHeader |
|
Shows or hides the current group sticky header when using grouped data. By default the sticky header is displayed (see example). | |
size |
|
|
Sets the size of the component. |
tabindex |
|
|
Sets the |
tagMapper |
|
Sets a function that transforms selected data items into display tags. Use this to customize how selected items appear as tags. | |
textField |
|
Sets the field name that contains the item text in the data objects.
Skip this property when your data contains only primitive values.
Supports nested property paths like | |
value |
|
Sets the selected values of the MultiSelect.
Accepts primitive values (strings, numbers) or complex objects.
Use the
| |
valueField |
|
Sets the field name that contains the item value in the data objects.
Skip this property when your data contains only primitive values.
Supports nested property paths like | |
valueNormalizer |
|
Sets a function that normalizes custom user input into data items. Use this when your data items differ from simple strings. | |
valuePrimitive |
|
Controls the type of selected values.
Set to | |
virtual |
|
Enables virtualization to improve performance with large datasets.
Pass |
Fields
Name | Type | Default | Description |
---|---|---|---|
isOpen |
|
Returns the current open state. Returns |
Events
Name | Type | Description |
---|---|---|
close |
|
Fires before the popup closes.
You can prevent the popup from closing by calling |
closed |
|
Fires after the popup closes completely. |
filterChange |
|
Fires when the user types in the input field. Use this event to filter the data source based on user input. |
inputBlur |
|
Fires when the input element inside the MultiSelect loses focus. |
inputFocus |
|
Fires when the user focuses the input element inside the MultiSelect. |
blur |
|
Fires when the MultiSelect component loses focus. |
focus |
|
Fires when the user focuses the MultiSelect component. |
open |
|
Fires before the popup opens.
You can prevent the popup from opening by calling |
opened |
|
Fires after the popup opens completely. |
removeTag |
|
Fires before a tag gets removed from the selection.
You can prevent tag removal by calling |
valueChange |
|
Fires when the value changes through user interaction or the Clear button. This event does not fire when you change the value programmatically. |
Methods
blur |
---|
Removes focus from the MultiSelect input element. |
focus |
---|
Focuses the MultiSelect input element. |
focusItemAt | ||||||
---|---|---|---|---|---|---|
Focuses a specific item in the MultiSelect based on the provided index.
Sets the index to | ||||||
|
reset |
---|
Resets the MultiSelect by clearing the text and value.
This method does not trigger the |
toggle | ||||||
---|---|---|---|---|---|---|
Toggles the visibility of the popup or actionSheet
(see example).
If you use the | ||||||
|