LearnNewsExamplesServices
Frontmatter
id9151
titlefeat(grid): Support runtime column dataField changes
stateClosed
labels
documentationenhancementcore
assigneestobiu
createdAtFeb 14, 2026, 1:51 AM
updatedAtFeb 14, 2026, 2:01 AM
githubUrlhttps://github.com/neomjs/neo/issues/9151
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 14, 2026, 1:57 AM

feat(grid): Support runtime column dataField changes

Closed v12.0.0 documentationenhancementcore
tobiu
tobiu commented on Feb 14, 2026, 1:51 AM

Enable Neo.grid.column.Base to handle dynamic changes to its dataField config at runtime.

Goals

  • Make dataField reactive (dataField_).
  • Implement afterSetDataField to automatically update:
    1. The Grid.Body column positions map (handling the re-keying logic).
    2. The corresponding HeaderButton (to preserve sorting/filtering bindings).

Implementation Details

The afterSetDataField method must perform a "remove -> mutate -> add" sequence on the body.columnPositions Collection. This is critical because the Collection uses dataField as its keyProperty. Modifying the field in-place without removing it first would leave the internal Map index pointing to the old key, breaking column lookups in Row.mjs.

This enhancement removes the need for manual synchronization logic in application code (e.g. DevIndex).

tobiu added the documentation label on Feb 14, 2026, 1:51 AM
tobiu added the enhancement label on Feb 14, 2026, 1:51 AM
tobiu added the core label on Feb 14, 2026, 1:51 AM
tobiu
tobiu Feb 14, 2026, 1:55 AM

Input from Gemini 3 Pro:

✦ I have enhanced the JSDoc for dataField_ to explicitly state:

  • It maps to a Neo.data.Model field.
  • It must be unique within the grid.
  • It supports runtime changes.
tobiu assigned to @tobiu on Feb 14, 2026, 1:57 AM
tobiu closed this issue on Feb 14, 2026, 1:57 AM