Skip to content

feat(grid): Support runtime column dataField changes #9151

@tobiu

Description

@tobiu

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).

Metadata

Metadata

Assignees

Labels

coreCore framework functionalitydocumentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions