-
-
Notifications
You must be signed in to change notification settings - Fork 202
refactor: Switch Grid Row to explicit updateContent pattern (#8964) #8972
Copy link
Copy link
Closed
Labels
Description
The current reactivity model for Neo.grid.Row using record_ and rowIndex_ reactive configs has proven brittle and prone to race conditions, update loops, and stale data (e.g., columns disappearing after scrolling).
Proposed Architecture:
- Remove Reactivity: Convert
record_androwIndex_to standard non-reactive configs inNeo.grid.Row. - Explicit Update Method: Introduce
updateContent({record, rowIndex})inNeo.grid.Row.- This method will synchronously update the instance properties.
- It will then explicitly trigger
createVdom().
- Refactor GridBody:
- Update
createViewDatato callrow.updateContent()directly for every row in the view window. - Remove the
forceparameter logic asupdateContentwill always force a VDOM generation. - This simplifies the update logic and ensures determinism.
- Update
Tasks:
- Refactor
src/grid/Row.mjs:- Change
record_torecord. - Change
rowIndex_torowIndex. - Remove
afterSetRecord. - Implement
updateContent(data).
- Change
- Refactor
src/grid/Body.mjs:- Update
createViewDatato useitem.updateContent({record, rowIndex}). - Remove
forceparameter usage.
- Update
Reactions are currently unavailable