Frontmatter
| id | 9483 |
| title | Grid: Implement Reactive locked Config and Run-Time Column Reordering |
| state | Closed |
| labels | enhancementaigrid |
| assignees | tobiu |
| createdAt | Mar 16, 2026, 12:10 PM |
| updatedAt | Mar 16, 2026, 12:31 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9483 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 9456 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 16, 2026, 12:31 PM |
Grid: Implement Reactive locked Config and Run-Time Column Reordering
tobiu assigned to @tobiu on Mar 16, 2026, 12:10 PM
tobiu added parent issue #9456 on Mar 16, 2026, 12:10 PM

tobiu
Mar 16, 2026, 12:30 PM
Input from Gemini 3.1 Pro:
✦ I have completed the implementation for this sub-task (#9483).
Changes Implemented:
grid.column.Base: Added the reactivelocked_config ('start','end',null) and implementedafterSetLocked()to triggerparent.onColumnLockChange(this).grid.header.Button: Added the reactivelocked_config and implementedafterSetLocked()to dynamically update theneo-locked-startandneo-locked-endCSS classes.grid.Container:
- Extracted column sorting logic into the
sortColumns(columnsArray)method for reusability.- Implemented
onColumnLockChange(column)which handles the synchronization pipeline.- Used the Container API
moveTo()inside asilentVdomUpdateblock to bulk-reorder the header buttons cleanly without destroying instances.- Re-ordered the
me.columnscollection cleanly usingclearSilent()andadd()to avoid triggering redundantmutateevents that would otherwise ping-pong thearia-colcount.- Called
headerToolbar.passSizeToBody(false)to mathematically recalculate logical X coordinates.- Explicitly called
me.body.createViewData()at the end of the pipeline to trigger a full row/cell re-render, ensuring the new column order and styles are immediately reflected in the viewport via the cell pooling engine.
tobiu closed this issue on Mar 16, 2026, 12:31 PM
tobiu cross-referenced by #9460 on Mar 16, 2026, 1:22 PM
This is a sub-task of Epic #9456 (Buffered Grid - High-Performance Locked Columns).
Context: To support locking columns dynamically at run-time (e.g., from a context menu) or restoring saved grid states, the
lockedconfiguration needs to be fully reactive. This requires a robust architectural pipeline to ensure all layers of the Grid (thecolumnscollection,header.Toolbaritems, layout engine, andBodyVDOM) stay perfectly synchronized without memory leaks or tearing.Implementation Plan:
grid.column.Base:locked_config ('start' | 'end' | null).afterSetLocked(value, oldValue). IfoldValue !== undefined, triggerthis.parent.onColumnLockChange(this).grid.header.Button:lockedvalue and updates its CSS classes (e.g.,neo-locked-start).grid.Container:createColumns()into a reusablesortColumns(columnsArray)method.onColumnLockChange(column).me.columnsarray usingsortColumns().headerToolbar.itemsarray to match the new column order (without destroying/recreating instances).headerToolbar.passSizeToBody(false)to trigger the mathematical layout recalculation.grid.Body:body.createViewData()to re-render the visible rows.