-
-
Notifications
You must be signed in to change notification settings - Fork 202
Fix Grid Row Reactivity & AnimatedChange Column for In-Place Updates #8984
Copy link
Copy link
Closed
Labels
Description
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:
- Row Update Failure: In-place record updates maintain the same record reference and rowIndex. The new
Neo.grid.Rowarchitecture relies on reactive config changes to trigger updates. Since the values are strictly equal,row.record = recorddoes not triggerafterSetRecord, and thus no VDOM update occurs. - Animation Failure: The
AnimatedChangecolumn implementation is obsolete. It currently attempts to find the cell node withinbody.vdomand callbody.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 specificRowcomponent's VDOM and trigger a row-level update.
Solution:
- Force Row Update: Update
GridBody.onStoreRecordChangeto explicitly callrow.createVdom()when a record is modified, ensuring the new data is rendered even if the record reference hasn't changed. - Refactor Animation: Update
src/grid/column/AnimatedChange.mjsto:- Locate the correct
Rowcomponent instance. - Modify the Row's VDOM to add the animation class.
- Call
row.update()instead ofbody.update().
- Locate the correct
Reactions are currently unavailable