First of all below implementations uses setIsActive(true); which every time its called emits activated event.
I have tried to use state manipulation to init values but unsuccessfully
How to select multiple nodes
my implementation is not optimal.
setSelected(selected = []) {
this.selected = selected;
selected.forEach(node => {
// need to find better way to select multiple nodes
const toActivate: any = this.tree.treeModel.getNodeById(node.id || node);
if (!toActivate.isActive) {
toActivate.setIsActive(true);
}
});
}
How to select all nodes
// need to find better way to select all nodes
this.zone.runOutsideAngular(() => {
this.tree.treeModel.doForAll((node: TreeNode) => node.isActive !== true && node.setIsActive(true, true));
});
AngularTreeNode is this lib TreeNode, it has alias cause I have the same name specified for my nodes
First of all below implementations uses setIsActive(true); which every time its called emits activated event.
I have tried to use state manipulation to init values but unsuccessfully
How to select multiple nodes
my implementation is not optimal.
How to select all nodes
AngularTreeNode is this lib TreeNode, it has alias cause I have the same name specified for my nodes