Skip to content

[Bug] Grid Component Columns Retain Stale State on Scroll #9286

@tobiu

Description

@tobiu

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 returns undefined. The Neo.mjs config system's set() method ignores undefined values, 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:

  1. Open the DevIndex app grid.
  2. Scroll to a row with a user who has GitHub organizations.
  3. Scroll quickly to a row where the user has NO GitHub organizations (field is undefined).
  4. Observe that the cell incorrectly displays the organizations from the recycled component's previous state.

Expected behavior
The component should correctly clear its state when the incoming data field is undefined.

Proposed Solution
In src/grid/column/Component.mjs, convert undefined values to null before passing them to component.set(). This explicitly forces the change detection to clear the state without requiring developers to manually handle this in every applyRecordConfigs extension.

Metadata

Metadata

Assignees

Labels

aibugSomething isn't workingcoreCore framework functionalitygridRelated to the Neo.grid package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions