Tree
Examples
Custom tree node
API (ix-tree)
Properties
Name
Description and specifications
context
Selection and collapsed state management
Type:
{ [x: string]: TreeItemContext; }Default:
{}model
Tree model
Type:
{ [x: string]: TreeItem<any>; }Default:
{}renderItem
Render function of tree items
Type:
(<T = any>(index: number, data: T, dataList: T[], context: TreeContext, update: (callback: UpdateCallback) => void) => HTMLElement) | undefinedroot
Initial root element will not be rendered
Attribute:
rootType:
stringEvents
Name
Description and specifications
contextChange
Context changed
Detail:
{ [x: string]: TreeItemContext; }nodeClicked
Since 1.5.0
Node clicked event
Detail:
stringnodeRemoved
Emits removed nodes
Detail:
anynodeToggled
Since 1.5.0
Node toggled event
Detail:
{ id: string; isExpaned: boolean; }API (ix-tree-item)
Properties
Name
Description and specifications
context
Context
Type:
TreeItemContext | undefinedhasChildren
Has tree item children
Attribute:
has-childrenType:
booleanDefault:
falsetext
Text
Attribute:
textType:
string | undefinedEvents
Name
Description and specifications
itemClick
Click on item not on the expand/collapse icon
Detail:
voidtoggle
Expand/Collapsed toggled
Detail:
void