Checking node with not-yet-loaded children causes an exception
See original GitHub issueHi there,
I’m having some issues combining lazy loading with checkboxes. Checking a node with hasChildren: true
when the children are not loaded yet causes an exception. See plunkr:
https://plnkr.co/edit/wigPSzzk3R0XM9RE173D?p=preview
Steps to reproduce:
- Check Root2
SecondChild has one async loaded child and is not checked after expanding. After all the async children are loaded the issue disappears.
Is there a way to work around this or is this a bug?
Stack trace from plunkr:
ERROR TypeError: Cannot read property 'forEach' of undefined
at e.setIsSelected (VM630 angular-tree-component@7.0.1:1)
at eval (VM630 angular-tree-component@7.0.1:1)
at Array.forEach (<anonymous>)
at ObservableArray.eval (VM672 mobx@^3:697)
at e.setIsSelected (VM630 angular-tree-component@7.0.1:1)
at e.toggleSelected (VM630 angular-tree-component@7.0.1:1)
at TOGGLE_SELECTED (VM630 angular-tree-component@7.0.1:1)
at e.mouseAction (VM630 angular-tree-component@7.0.1:1)
at Object.eval [as handleEvent] (VM674 e.ngfactory.js:13)
at handleEvent (VM627 core.umd.js:13620)
Thanks for the work on the tree component and looking forward to hearing from you.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Checking node with not-yet-loaded children causes ... - GitHub
Hi there, I'm having some issues combining lazy loading with checkboxes. Checking a node with hasChildren: true when the children are not ...
Read more >Process | Node.js v19.3.0 Documentation
Attempting to resume application code without properly recovering from the exception can cause additional unforeseen and unpredictable issues. Exceptions thrown ...
Read more >Node.childNodes - Web APIs - MDN Web Docs
The read-only childNodes property of the Node interface returns a live NodeList of child nodes of the given element where the first child...
Read more >process
The 'uncaughtException' event is emitted when an exception bubbles all the way back to the event loop. By default, Node.js handles such exceptions...
Read more >tables.group — PyTables 3.8.0 documentation
Any attempt to create a new child node whose name starts with one of these prefixes will raise a ValueError exception. Another effect...
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 Free
Top 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
Here is a fix that I have issued in a local branch. I attempted to push this up to the repo in a new branch but access was denied
In
tree-node.model.ts / setIsSelected
I could not create a new branch and push I was unauthorised and therefor could not create a pull request