LearnNewsExamplesServices
Frontmatter
id9481
titleAuto-detect `isTreeGrid` config based on the Store instance
stateClosed
labels
enhancementaigrid
assigneestobiu
createdAtMar 15, 2026, 7:54 PM
updatedAtMar 15, 2026, 7:55 PM
githubUrlhttps://github.com/neomjs/neo/issues/9481
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 15, 2026, 7:55 PM

Auto-detect isTreeGrid config based on the Store instance

Closed v12.1.0 enhancementaigrid
tobiu
tobiu commented on Mar 15, 2026, 7:54 PM

Currently, developers are forced to manually set isTreeGrid: true on Neo.grid.Container when using a TreeStore (as seen in examples/grid/tree/GridContainer.mjs and examples/grid/treeBigData/GridContainer.mjs).

Since a TreeGrid relies entirely on a TreeStore for its hierarchical logic, we can improve the DX by auto-detecting this state.

This enhancement modifies afterSetStore() in src/grid/Container.mjs to automatically set me.isTreeGrid = value?.isTreeStore === true, eliminating the need for manual configuration and ensuring ARIA roles are always correct even if the store changes dynamically.

In addition, it applies the "Anchor & Echo" Knowledge Base Enhancement Strategy to the store_ configs in both grid.Container and grid.Body, clarifying their support for both flat stores and hierarchical TreeStore instances, and fixes copy-paste JSDoc typing errors for the afterSetStore method params.

tobiu added the enhancement label on Mar 15, 2026, 7:54 PM
tobiu added the ai label on Mar 15, 2026, 7:54 PM
tobiu added the grid label on Mar 15, 2026, 7:54 PM
tobiu referenced in commit 938d435 - "feat(grid): Auto-detect isTreeGrid config based on the Store instance (#9481)" on Mar 15, 2026, 7:55 PM
tobiu assigned to @tobiu on Mar 15, 2026, 7:55 PM
tobiu
tobiu Mar 15, 2026, 7:55 PM

Input from Gemini 3.1 Pro:

✦ I have implemented the auto-detection of isTreeGrid based on store.isTreeStore within afterSetStore for the Grid Container. The manual isTreeGrid config has been removed from the relevant examples (examples/grid/tree and examples/grid/treeBigData). Additionally, JSDocs for the store_ and afterSetStore methods in both Container.mjs and Body.mjs have been enhanced to apply the "Anchor & Echo" strategy, correcting type definitions and adding broader conceptual context. Code has been committed and pushed.

tobiu closed this issue on Mar 15, 2026, 7:55 PM