Skip to content

Enforce hideMode: 'visibility' for Component Grid Columns #9183

@tobiu

Description

@tobiu

Component-based grid columns currently default to hideMode: 'removeDom' (inherited from Neo.grid.column.Base).
This enables cell pooling, which uses index-based IDs (e.g., __cell-0).

However, this breaks SortZone's "surgical DOM move" logic during drag-and-drop:

  1. ID Instability: Reordering columns changes the mapping of dataFields to indices.
  2. Restoration Failure: SortZone restores content to the old ID (e.g., __cell-5), but the grid renders the column at a new ID (e.g., __cell-3).
  3. State Loss: This causes the VDOM engine to "replace" rather than "move" components, destroying internal state (Canvas, etc.) or leaving cells empty ("pruned").

The Fix:
Update Neo.grid.column.Component to default to hideMode: 'visibility'.
This ensures:

  1. Stable IDs: Cells use __dataField IDs, which persist across reorders.
  2. Zero DOM Thrashing: Cells are toggled via visibility, avoiding insert/remove operations, aligning with the Grid's "Fixed-DOM-Order" strategy.
  3. Drag Stability: SortZone can correctly restore content to the stable ID.

This will implicitly fix issues with GitHubOrgs, Heuristics, and other component columns.

Metadata

Metadata

Assignees

Labels

aiarchitectureArchitecture related issuesbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions