-
-
Notifications
You must be signed in to change notification settings - Fork 202
Fix GridBody Column Position Sync on DataField Change #9195
Copy link
Copy link
Closed
Labels
aibugSomething isn't workingSomething isn't workingcoreCore framework functionalityCore framework functionality
Description
Objective
Fix a regression in Neo.grid.Body where changing a column's dataField at runtime (e.g., toggling between Total/Public/Private stats) desynchronizes the columnPositions map and Row recycling logic, causing rendering artifacts during horizontal scrolling.
Root Cause Analysis
- Stale
columnPositionskeys: TheGridBodymaintains acolumnPositionscollection keyed bydataField. WhendataFieldchanges on the column, the map key remains the old name, breaking lookups duringupdateMountedAndVisibleColumns. - Stale
oldCellMapkeys: InNeo.grid.Row, the recycling logic usesoldCellMapkeyed bydataFieldto find reusable DOM nodes. If the column'sdataFieldchanges but the VDOM nodes still have the olddata-fieldattribute, recycling fails or misidentifies cells.
Tasks
- Sync
columnPositions: Ensure that when a Column'sdataFieldis updated, theGridBody'scolumnPositionsmap is updated to reflect the new key. - Robust Recycling: Verify
Rowrecycling logic can handledataFieldtransitions, possibly by forcing a full re-render (non-recycled) when column definitions change significantly. - Verification: Verify that horizontal scrolling works seamlessly after a Data Mode switch in DevIndex.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
aibugSomething isn't workingSomething isn't workingcoreCore framework functionalityCore framework functionality