Tree KIT

Examples API Setup

TreeItem

Name and descriptionType
[tuiTreeController]
Directive used to enable opening/closing of nodes with children. Boolean input is the default state.
boolean

Tree

Name and descriptionType
[childrenHandler]
TuiHandler<T, readonly T[]>
[content]
PolymorpheusContent<TuiTreeContext>
[data]
T
[tuiTreeController]
Directive used to enable opening/closing of nodes with children. Boolean input is the default state.
boolean
[map]
A map used with controller directive for manual programmatic toggling.
Map<T, boolean>
[trackBy]
Function used by *ngFor directive to render nested tree items.
TrackByFunction<T>

Tokens

Name and descriptionType
TUI_TREE_CONTENT
Provide your own component used internally to display node content (see this example )
PolymorpheusContent<TuiTreeItemContext>
TUI_TREE_CONTROLLER
Provide your own open/closed controlling mechanism
TuiTreeController
TUI_TREE_ACCESSOR
Provide your own tracker for value/node pairs (so you can match TreeItem instances to their corresponding data: T when using Tree component with custom open/closed controller)
TuiTreeAccessor<T>