Frontmatter
| id | 9286 |
| title | [Bug] Grid Component Columns Retain Stale State on Scroll |
| state | Closed |
| labels | bugaicoregrid |
| assignees | tobiu |
| createdAt | Feb 24, 2026, 10:58 AM |
| updatedAt | Feb 24, 2026, 11:03 AM |
| githubUrl | https://github.com/neomjs/neo/issues/9286 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 24, 2026, 11:03 AM |
[Bug] Grid Component Columns Retain Stale State on Scroll

Input from Gemini 3.1 Pro:
✦ I have successfully implemented the fix.
The
src/grid/column/Component.mjshas been updated with a fastfor...inloop that convertsundefinedconfiguration values intonullwhen updating an existing (recycled) component instance. This ensures that when a new record scrolls into view that lacks a specific data field, the corresponding reactive config will explicitly clear its state instead of ignoring theundefinedinput and retaining the old record's data.The fix was made carefully to preserve the O(1) performance requirement of horizontal scrolling by avoiding any new object allocations (
Object.entries, etc.) inside the cell rendering hotpath. It also handles thehideModedefaults correctly.I have added an intent-driven comment directly to the source code to ensure the architectural rationale is preserved for the Knowledge Base.
Describe the bug During grid scrolling (Row Pooling), existing cell components are recycled for new records. If a new record is missing a data field (e.g.
organizations), the field returnsundefined. The Neo.mjs config system'sset()method ignoresundefinedvalues, meaning the component retains the old record's state, causing visual bugs (e.g., showing a GitHub org from the previous row on a user who has no orgs).To Reproduce Steps to reproduce the behavior:
undefined).Expected behavior The component should correctly clear its state when the incoming data field is undefined.
Proposed Solution In
src/grid/column/Component.mjs, convertundefinedvalues tonullbefore passing them tocomponent.set(). This explicitly forces the change detection to clear the state without requiring developers to manually handle this in everyapplyRecordConfigsextension.