LearnNewsExamplesServices
Frontmatter
id9427
titleFix TreeStore projection mutations and Row VDOM recycling
stateClosed
labels
bugaicoregrid
assigneestobiu
createdAtMar 10, 2026, 12:33 PM
updatedAtMar 10, 2026, 12:34 PM
githubUrlhttps://github.com/neomjs/neo/issues/9427
authortobiu
commentsCount0
parentIssue9404
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 10, 2026, 12:34 PM

Fix TreeStore projection mutations and Row VDOM recycling

Closed v12.1.0 bugaicoregrid
tobiu
tobiu commented on Mar 10, 2026, 12:33 PM

Two initial issues were identified with the TreeGrid implementation regarding updates when expanding/collapsing nodes:

  1. Row VDOM Recycling Bug: When grid.Body intercepted a recordChange event, it called row.createVdom() with default arguments (recycle=true). Because the recordId of the mutating record didn't change, the cell recycling logic skipped calling cellRenderer. The Tree cell component never received updated primitive configs, failing to trigger UI updates. Fixed by calling row.createVdom(false, false) for record updates to enforce a fresh cellRenderer pass.
  2. TreeStore Projection Mutation Bug: The TreeStore's expand and collapse methods manipulate the flat visible grid array (the Projection Layer). However, they incorrectly called me.splice(), which is overridden to handle deep structural mutations (ingesting/removing from #childrenMap). Fixed by using super.splice() so visual mutations mutate the underlying Collection without corrupting the structural map layer.
  3. TreeStore.get() polymorphism: The TreeStore.get method override failed to resolve Record object parameters into primitive keys, causing expand and collapse to instantly abort when passed a Record object. Fixed by implementing isItem checking.

Note: While these structural fixes resolve the early returns and incorrect map mutations, we are still facing issues with visual rendering where icons occasionally fail to update or toggle state correctly on repeated clicks. This will be addressed in a follow-up task.

tobiu assigned to @tobiu on Mar 10, 2026, 12:33 PM
tobiu added the bug label on Mar 10, 2026, 12:33 PM
tobiu added the ai label on Mar 10, 2026, 12:33 PM
tobiu added the core label on Mar 10, 2026, 12:33 PM
tobiu added the grid label on Mar 10, 2026, 12:33 PM
tobiu added parent issue #9404 on Mar 10, 2026, 12:33 PM
tobiu referenced in commit a4154c0 - "fix(grid): Fix TreeStore projection mutations and Row VDOM recycling (#9427)" on Mar 10, 2026, 12:33 PM
tobiu closed this issue on Mar 10, 2026, 12:34 PM