Skip to content

Tmp/treenode fix1 - #2426

Open
gjulivan wants to merge 2 commits into
fix/WC-3564_tree-node-stuck-spinner-microflowfrom
tmp/treenode-fix1
Open

gjulivan wants to merge 2 commits into
fix/WC-3564_tree-node-stuck-spinner-microflowfrom
tmp/treenode-fix1

Conversation

@gjulivan

Copy link
Copy Markdown
Collaborator

Pull request type


Description

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
@gjulivan
gjulivan requested a review from a team as a code owner September 16, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants