angular-tree-component icon indicating copy to clipboard operation
angular-tree-component copied to clipboard

Error output in console in v8.0 and later version when data source was changed.

Open RonnyRen opened this issue 6 years ago • 0 comments

The following code worked in v7.2.1 without any error. Code Snippets: @ViewChild(TreeComponent) tree: TreeComponent; function showTree(){ setTimeout(() => { if (this.tree) { this.tree.treeModel.expandAll(); this.tree.sizeChanged(); let activeNodeId = this.setupId; let activeNode: TreeNode = this.tree.treeModel.getNodeById(activeNodeId); activeNode.setActiveAndVisible(); } }, 0); }

Features: image When checkbox 'show empty' is changed, the data source of the tree component would be updated and active node will keep active and visible. If checked it, no error happened and it worked as below. image When I used v8.0 or later version, when unchecked it, sometimes it worked, however the error always happened as following: image Detail Error: firstNode has value but firstNode.parent is null image

image

Note: I reverted to v7.2.1, it could work and without any error.

RonnyRen avatar May 05 '19 10:05 RonnyRen