MultiSelectTreeComponent
Represents the Kendo UI for Angular MultiSelectTree component.
The MultiSelectTree
lets you select multiple items from hierarchical data in a tree structure.
It provides built-in filtering, checkboxes, and adaptive rendering for mobile devices.
@Component({
selector: 'my-app',
template: `
<kendo-multiselecttree
[data]="data"
textField="text"
valueField="value"
[(value)]="selectedValues">
</kendo-multiselecttree>
`
})
export class AppComponent {
public data = [
{ text: 'Root', value: 1, items: [
{ text: 'Child 1', value: 2 },
{ text: 'Child 2', value: 3 }
]}
];
public selectedValues = [2, 3];
}
Selector
kendo-multiselecttree
Export Name
Accessible in templates as #kendoMultiSelectTreeInstance="kendoMultiSelectTree"
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 on small screens. No subtitle appears by default. | |
adaptiveTitle |
|
|
Sets the title text for the ActionSheet in adaptive mode on small screens. Uses the component label by default if not set. |
checkableSettings |
|
|
Configures the checkbox behavior for the MultiSelecTree nodes.
Use |
checkAll |
|
|
Shows a checkbox to select or deselect all visible tree nodes. Appears above the tree when checkboxes are enabled. |
clearButton |
|
|
Shows a clear button to reset all selections. Appears on hover when selections exist and the component is not disabled. |
data |
|
Sets the hierarchical data source for the tree structure. Provide an array of objects that contain the tree data and structure. | |
dataItems |
|
Sets the data items that correspond to the selected values. Required when using primitive values to resolve the full data objects. | |
disabled |
|
|
Controls whether the component accepts user input.
Prevents all user interactions when set to |
fetchChildren |
|
Function that provides child nodes for a parent node. Return an Observable of child objects for the given parent. | |
fillMode |
|
|
Sets the fill style for the component background and borders. |
filterable |
|
|
Enables the built-in filter input for searching tree nodes. Shows a search box above the tree when enabled. |
focusableId |
|
Sets the unique identifier for the focusable element. Used internally for accessibility and label association. | |
hasChildren |
|
Determines if a tree node contains child nodes.
Return | |
isNodeExpanded |
|
Determines if a specific node is expanded. The function is executed for each data item. | |
isNodeVisible |
|
Determines if a tree node should be hidden. | |
itemDisabled |
|
Determines if a tree node is disabled. The function is executed for each data item. | |
listHeight |
|
|
Sets the maximum height of the options list in the popup. Controls vertical scrolling when content exceeds this height. |
loading |
|
|
Controls the loading state visual indicator.
Shows a loading spinner when set to |
loadOnDemand |
|
|
Controls when child nodes load from the data source.
Set to |
placeholder |
|
|
Sets the placeholder text shown when no items are selected. Helps guide users on what action to take. |
popupSettings |
|
Configures the popup container settings: animation, dimensions, styling and positioning. | |
readonly |
|
|
Sets the component to read-only mode. Displays current selections but prevents changes. |
rounded |
|
|
Sets the border radius style of the component. |
size |
|
|
Sets the visual size of the component. |
tabindex |
|
|
Sets the tab index for keyboard navigation.
Use |
tagMapper |
| ||
textField |
|
Specifies which data field provides the display text for tree nodes.
| |
value |
|
Sets the selected values in the component.
Accepts primitive values if | |
valueDepth |
|
|
Sets the levels in the data set where the values can be found when |
valueField |
|
Specifies which data field provides the unique values for tree nodes.
| |
valuePrimitive |
|
|
Determines the data type of selected values.
Set to |
Fields
Name | Type | Default | Description |
---|---|---|---|
isOpen |
|
Returns the current open state. Returns |
Events
Name | Type | Description |
---|---|---|
close |
|
Fires before the popup closes. Cancel this event to prevent the popup from closing. |
closed |
|
Fires after the popup closes completely. Use this event to perform cleanup actions when the popup becomes hidden. |
filterChange |
|
Fires when the filter input value changes. Use this event to implement custom filtering logic. |
nodeCollapse |
|
Fires when a user collapses a tree node. Use this event to respond to node collapse actions. |
nodeExpand |
|
Fires when a tree node is expanded. Use this event to respond to node expansion actions. |
blur |
|
Fires when the component gets blurred. |
focus |
|
Fires when the component receives focus. |
open |
|
Fires when the popup is about to open. (See example). This event is preventable. When cancelled, the popup remains closed. |
opened |
|
Fires after the popup opens completely. Use this event to perform actions when the popup becomes visible. |
removeTag |
|
Fires before a tag is removed. Cancel this event to prevent tag removal. |
valueChange |
|
Fires when the selected value changes. Use this event to respond to selection changes. |
Methods
blur |
---|
Removes focus from the component. Call this method to programmatically blur the MultiSelectTree. |
focus |
---|
Sets focus to the component. Call this method to programmatically focus the MultiSelectTree. |
focusItemAt | ||||||
---|---|---|---|---|---|---|
Sets focus to a specific tree item by index. Provide the item index in format like '1_1' to focus that item. The item must be expanded and enabled to receive focus. | ||||||
|
reset |
---|
Clears all selected values from the component. This method does not trigger the valueChange event. |
toggle | ||||||
---|---|---|---|---|---|---|
Opens or closes the popup programmatically.
Pass | ||||||
|