Async load is duplicated after updating tree model
See original GitHub issueHi there, so my tree has async config with getChildren with promise and every time I update the tree model by creating a new array this.nodes = [newNode, ...this.nodes];
or this.tree.treeModel.update()
. The async now is call twice and make 2 api requests with same URL when click to expand the nodes. If I update the tree model again it will increase the async call to 3.
My code base on:
- Tree component version 7
- Angular 4
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Async load is duplicated after updating tree model #517 - GitHub
Hi there, so my tree has async config with getChildren with promise and every time I update the tree model by creating a...
Read more >AngularTreeComponent: treeModel.update() works async ...
I neeed to replace some data on the tree, then run treemodel.update() and after that select a node. Tree is already rendered at...
Read more >Kendo Load On Demand Treelist showing duplicate records ...
I am using Kendo Treelist ie: Load on Demand in our application. ... When I try to apply filter to my columns, the...
Read more >How to avoid Angular injectable instances duplication
In this article we'll explore when and why Angular creates two instances of the same service and what solutions exist to ensure a...
Read more >42 Invokie an Asynchronous Service from a SOA Composite
When to implement: A SOA composite application needs to invoke an asynchronous service such as an Oracle ADF service or another SOA composite...
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 found the same issue, using Angular 5, and tree component version 7.0.1. After some investigation - looks like VirtualRoot stay alive after new nodes re-render. Only fix i able to do right now - check if virtual root is correct on getChildren call:
That is only dirty workaround to prevent duplicated calls to API, but doesn’t actually fix initial issue. Any tries to kill virtualroot or clean up data before prior was unsuccessful. So would be nice to see any valid Solution.
Closing this issue due to inactivity. Please open a new issue if the problem still exists.