Tmp/treenode fix1 - #2426
Open
gjulivan wants to merge 2 commits into
Open
Tmp/treenode fix1#2426gjulivan wants to merge 2 commits into
gjulivan wants to merge 2 commits into
Conversation
The infinite-depth tree (`Parent association`) builds its node map incrementally. A data-source refresh never re-ordered siblings: reordering items through a sequence attribute stayed invisible until the page was reopened. The same hook also collapsed the whole tree on any refresh. Expansion state is now remembered per item id and restored when a node is recreated, and a loading data source no longer clears the tree.
In useInfiniteTreeNode.ts: expanding a node only pre-loaded the children that happened to be in the datasource at that moment, so a child added later (or arriving in a later batch) was never pre-loaded and its parent lost the expand chevron below the second level. Now the hook keeps a set of expanded node ids (expandedIdsRef) and, on every datasource update, pre-loads any new item whose parent is in that set, so every visible node knows whether it has children
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type
Description