|
|
|
<TreeViewComponent fields={this.fields} ref={(scope) => { this.treeObj = scope; }} nodeExpanding={this.nodeExpanding.bind(this)}/>
nodeExpanding(args) {
if(args.isInteracted){
this.treeObj.addNodes(this.localData2, args.nodeData.id);
}
} |
|
nodeExpanding(args) { // Check the condition if child node are already present or not. if(args.isInteracted && args.node.querySelector('li') === null){ this.treeObj.addNodes(this.localData2, args.nodeData.id); } } |