tree.treeModel.roots returns []
See original GitHub issueI want to collapse, expand roots after initialization.
I have initialized a tree with 1 root, which has several children.
I have defined the tree as a ViewChild, and after console.logging the tree
I can see in the console, that roots in treeModel is an array of length 1. But after console.logging tree.treeModel.roots
I get empty array.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
tree.treeModel.roots returns [] · Issue #58 - GitHub
I want to collapse, expand roots after initialization. I have initialized a tree with 1 root, which has several children.
Read more >TreeModel (Java SE 17 & JDK 17) - Oracle Help Center
Returns the root of the tree. Returns null only if the tree has no nodes. Returns: the root of the tree. getChild. Object ......
Read more >angular tree component expand after loading data
When you update your nodes you need to listen to the updateData Event. <tree-root [nodes]="nodes" (updateData)="onUpdateData()"></tree-root> ...
Read more >TreeModel
Manipulate and traverse tree-like structures in javascript. ... var node12 = root.first(function (node) { return node.model.id === 12; }); ...
Read more >Simple Tree Model Example | Qt Widgets 6.4.1
The Simple Tree Model example shows how to use a hierarchical model with Qt's ... root item in the model will not have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m assuming you initialize reports with an empty array, and only later initialize it with data? You have 3 options:
On Tue, Sep 27, 2016 at 12:34 PM, Alexander Ciesielski < notifications@github.com> wrote:
reports
is initialized by parent component withasync
pipe.Using
onUpdateData
instead ofonInitialized
fixed the issue, makes sense! Thanks!