Skip to content

Fix Grid Row Reactivity & AnimatedChange Column for In-Place Updates #8984

@tobiu

Description

@tobiu

Problem:
In the BigData grid example, the "Increase Counter" button modifies a record property in place (record.counter++), but the UI does not update.

Causes:

  1. Row Update Failure: In-place record updates maintain the same record reference and rowIndex. The new Neo.grid.Row architecture relies on reactive config changes to trigger updates. Since the values are strictly equal, row.record = record does not trigger afterSetRecord, and thus no VDOM update occurs.
  2. Animation Failure: The AnimatedChange column implementation is obsolete. It currently attempts to find the cell node within body.vdom and call body.update(). With the new architecture, the Body VDOM is a container of Row components, not the full cell markup. The column needs to target the specific Row component's VDOM and trigger a row-level update.

Solution:

  1. Force Row Update: Update GridBody.onStoreRecordChange to explicitly call row.createVdom() when a record is modified, ensuring the new data is rendered even if the record reference hasn't changed.
  2. Refactor Animation: Update src/grid/column/AnimatedChange.mjs to:
    • Locate the correct Row component instance.
    • Modify the Row's VDOM to add the animation class.
    • Call row.update() instead of body.update().

Metadata

Metadata

Assignees

Labels

aibugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions