Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Show foldnode when prefetching #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeroen-huizer-conclusion

Fixes an issue where the foldnode was not shown for children with depth

autoexpand depth, when prefetch was enabled. Fixed by expanding and
collapsing all children when prefetching.

Fixes an issue where the foldnode was not shown for children with depth
> autoexpand depth, when prefetch was enabled. Fixed by expanding and
collapsing all children when prefetching.
@Andries-Smit
Copy link
Contributor

Great, this issues was bothering me for some time.
Though the fix looks dirty. Is there a better way of doing this? Will de side effect causes everything to be loaded

@jeroen-huizer-conclusion
Copy link
Author

Yeah it is kinda dirty. Though I did not find any side-effects so far.
With prefetch enabled, the entire tree will be loaded (which is what it is supposed to do, I'd say), but all nodes of depth greater then autoexpand depth are collapsed again (not that much overhead). If you disable prefetch, the tree is loaded upto the autoexpand depth.

Another approach I tried was inspecting the RenderNode.setCollapsed and RenderEdge.setCollapsed functions and using pieces of those that are relevant. But that led me to soo many more lines of code that this actually seemed the more elegant approach.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants