TreeViewComponent
Represents the Kendo UI TreeView component for Angular.
<kendo-treeview
kendoTreeViewExpandable
[nodes]="data"
textField="text"
[children]="fetchChildren"
[hasChildren]="hasChildren">
</kendo-treeview>
Selector
kendo-treeview
Export Name
Accessible in templates as #kendoTreeViewInstance="kendoTreeView"
Inputs
Name | Type | Default | Description |
---|---|---|---|
animate |
|
Enables or disables content animation. | |
children |
|
A function that provides the child nodes for a given parent node (see example). | |
disableParentNodesOnly |
|
|
Indicates whether only parent nodes should be disabled or their child nodes as well. |
expandDisabledNodes |
|
|
Allows expanding disabled nodes. |
filter |
|
Sets the initial value of the built-in filter input. | |
filterable |
|
|
Renders the built-in input element for filtering. If |
filterInputPlaceholder |
|
Sets the placeholder text for the filter input when the component is empty. | |
hasCheckbox |
|
A function that determines if a node has a checkbox. If there is no checkbox, the node is not checkable and is excluded from built-in check functionality. | |
hasChildren |
|
A function that determines if a node has child nodes (see example). | |
isChecked |
|
A function that determines if a node is checked (see example). | |
isDisabled |
|
A function that determines if a node is disabled. | |
isExpanded |
|
A function that determines if a node is expanded. | |
isSelected |
|
A function that determines if a node is selected (see example). | |
isVisible |
|
A callback that determines whether a TreeView node should be rendered as hidden. Uses the | |
loadOnDemand |
|
|
Indicates whether child nodes are fetched on expand or initally prefetched. |
navigable |
|
|
Enables keyboard navigation for the TreeView. |
nodes |
|
The nodes displayed by the TreeView (see example). | |
size |
|
|
Sets the size of the component. |
textField |
|
The fields of the data item that provide the text content of the nodes (see example). If set to an array, each level uses the field at the same index or the last item in the array. | |
trackBy |
|
A function that defines how to track node changes. By default, the TreeView tracks the nodes by data item object reference. |
Events
Name | Type | Description |
---|---|---|
addItem |
|
Fires after a dragged item is dropped (see example). Called on the TreeView where the item is dropped. |
checkedChange |
|
Fires when a TreeView node checkbox is selected (see example). |
childrenLoaded |
|
Fires when the children of the expanded node are loaded. |
collapse |
|
Fires when a TreeView node collapses. |
expand |
|
Fires when a TreeView node expands. |
filterChange |
|
Fires when the value of the built-in filter input changes. |
filterStateChange |
|
Emits when the built-in filtering mechanism updates node visibility. Used for the built-in auto-expand functionalities. Handle this event for custom implementations. |
nodeClick |
|
Fires when a TreeView node is clicked. |
nodeDblClick |
|
Fires when a TreeView node is double-clicked. |
nodeDrag |
|
Fires when an item is being dragged (see example). |
nodeDragEnd |
|
Fires on the source TreeView after the dragged item is dropped (see example). |
nodeDragStart |
|
Fires just before node dragging starts (see example). This event is preventable. Prevent the default event to stop drag hint creation and further drag events. |
nodeDrop |
|
Fires on the target TreeView when a dragged item is dropped (see example). Prevent the default event ( Use |
blur |
|
Fires when the component loses focus. |
focus |
|
Fires when the component receives focus. |
removeItem |
|
Fires after a dragged item is dropped (see example). Called on the TreeView from where the item is dragged. |
selectionChange |
|
Fires when a TreeView node is selected (see example). |
Methods
blur |
---|
Blurs the focused TreeView item. |
collapseNode | |||||||||
---|---|---|---|---|---|---|---|---|---|
Triggers the | |||||||||
|
expandNode | |||||||||
---|---|---|---|---|---|---|---|---|---|
Triggers the | |||||||||
|
focus | ||||||
---|---|---|---|---|---|---|
Focuses the first focusable item in the TreeView if no hierarchical index is provided. | ||||||
|
getNodePageSize | ||||||
---|---|---|---|---|---|---|
Gets the current page size of the data item's children collection (see example).
Pass | ||||||
| ||||||
|
itemLookup | ||||||
---|---|---|---|---|---|---|
Returns the | ||||||
| ||||||
|
rebindChildren |
---|
Calls the |
setNodePageSize | |||||||||
---|---|---|---|---|---|---|---|---|---|
Sets the page size of the data item's children collection (see example).
Pass | |||||||||
|