Skip to main content

Tree

Usage

PreviewAngularReactVueJavascript

Custom tree node

PreviewAngularReactVueJavascript

Properties (ix-tree)

Props

Name
Description and specifications
context
Selection and collapsed state management
Type:
{ [x: string]: TreeItemContext; }
Default:
{}
model
Tree model
Type:
{ [x: string]: TreeItem<any>; }
renderItem
Render function of tree items
Type:
<T = any>(index: number, data: T, dataList: T[], context: TreeContext, update: (callback: UpdateCallback) => void) => HTMLElement
root
Initial root element will not be rendered
Attribute:
root
Type:
string

Events

Name
Description and specifications
contextChange
Context changed
Detail:
{ [x: string]: TreeItemContext; }
nodeClicked
Since 1.5.0
Node clicked event
Detail:
string
nodeRemoved
Emits removed nodes
Detail:
any
nodeToggled
Since 1.5.0
Node toggled event
Detail:
{ id: string; isExpaned: boolean; }

Properties (ix-tree-item)

Props

Name
Description and specifications
context
Context
Type:
TreeItemContext
hasChildren
Has tree item children
Attribute:
has-children
Type:
boolean
text
Text
Attribute:
text
Type:
string

Events

Name
Description and specifications
itemClick
Clicked
Detail:
void
toggle
Expand/Collapsed toggled
Detail:
void