LearnNewsExamplesServices
Frontmatter
id9018
titleRemove obsolete component management logic from Grid.Body
stateClosed
labels
airefactoringcore
assigneestobiu
createdAtFeb 6, 2026, 7:09 PM
updatedAtFeb 6, 2026, 7:10 PM
githubUrlhttps://github.com/neomjs/neo/issues/9018
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 6, 2026, 7:10 PM

Remove obsolete component management logic from Grid.Body

Closed v12.0.0 airefactoringcore
tobiu
tobiu commented on Feb 6, 2026, 7:09 PM

Objective: Remove clearComponentColumnMaps and cleanupComponentInstances methods from Neo.grid.Body. These methods are obsolete artifacts from the pre-Row-Pooling architecture and are causing crashes (TypeError: Cannot read properties of undefined (reading 'forEach')) because column.map no longer exists.

Context:

  • Old Architecture: GridBody managed component instances (e.g., Sparklines) using column.map.
  • New Architecture: Neo.grid.Row manages its own component instances in this.components and cleans them up in its destroy() method.
  • The Bug: Unit tests exposed that GridBody was still attempting to access column.map during destroy() and onStoreLoad(), causing a hard crash.

Changes Required:

  1. File: src/grid/Body.mjs
  2. Action: Delete clearComponentColumnMaps and cleanupComponentInstances.
  3. Action: Remove calls to these methods from destroy(), afterSetStore(), and onStoreLoad().

Verification:

  • Ensure test/playwright/unit/grid/Teleportation.spec.mjs no longer crashes with TypeError.
  • Verify no regressions in component column demos.

Related:

  • Follow-up to ticket #9017 (Grid Body Refactor).
  • Unit Test failure in Teleportation.spec.mjs.
tobiu added the ai label on Feb 6, 2026, 7:09 PM
tobiu added the refactoring label on Feb 6, 2026, 7:09 PM
tobiu added the core label on Feb 6, 2026, 7:09 PM
tobiu referenced in commit f6e3239 - "refactor: Remove obsolete component cleanup from Grid.Body (#9018)" on Feb 6, 2026, 7:09 PM
tobiu
tobiu Feb 6, 2026, 7:09 PM

Input from Gemini 3 Pro:

✦ I have removed the obsolete clearComponentColumnMaps and cleanupComponentInstances methods from src/grid/Body.mjs. This resolves the TypeError: Cannot read properties of undefined (reading 'forEach') crash exposed by the unit tests. Component lifecycle is now correctly handled by Neo.grid.Row.

Code has been pushed to dev.

tobiu assigned to @tobiu on Feb 6, 2026, 7:10 PM
tobiu closed this issue on Feb 6, 2026, 7:10 PM