Each tree item is expanded with the following additional service properties and methods:
readonly $expanded: boolean
Item is expanded.
Expands the tree item (if it was collapsed). Works for both static and dynamic trees.
path
- an array that defines the path in the tree, starting at the root. The array can contain any items.
predicate
- a function that will be called to search for a specified item in the tree. Should return true
,
if the item
in the tree matches an item in the val
array. Predicate arguments:
item: ITreeElement
- item of the tree.val: any
- item from the array path
.Selects an item in the tree along the specified path. Only useful for dynamic trees. In the process, the method expands all intermediate nodes.
Working with trees is described in more detail in the section on hierarchical data models.