How can I dynamically load and open tree from bottom/leafs? #2789
Unanswered
FredrikElliot
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a functional tree that loads properly using ajax call in core.data when initialized.
I have a list of leaf ids that I need to open and select. Since the tree contains thousands of leafs, I don't want to load the full tree, but only the paths to the leafs in the list of ids. How can I do that? Is there an automatic way to include the loading of a not-already-loaded parent of a leaf I want to load?
I'm using load_node for the nodes and currently looping up to the root node for every leaf and adding all ids to a list, which I load in reverse order. But for many leafs the paths combine somewhere and loading all these already loaded parent nodes is inefficient. How can I do this smart?
The ajax call includes both child and parent id.
Beta Was this translation helpful? Give feedback.
All reactions