Skip to content

Fix Grid Cell Animations During Column Reordering #8976

@tobiu

Description

@tobiu

The Grid Column Reordering functionality (SortZone) has partially regressed following the introduction of Neo.grid.Row components. While the header items still animate correctly, the corresponding column cells in the grid body no longer sync with these movements.

Observed Regressions:

  1. Missing "Hide Original" Behavior: When dragging a header, the original column cells should be hidden (or opacity reduced) to indicate they are being moved. This currently fails.
  2. Missing Cell Slide Animation: In the dev branch, when a header item is dragged and other headers slide to accommodate it, the corresponding cells in the grid body also slide horizontally to match the new column positions. In the feature branch, the cells remain static until the drop operation completes.

Root Cause:
The SortZone logic (and potentially Grid.Body logic) likely relies on manipulating the deep VDOM of the grid body directly (e.g., finding all cells for a column index and adjusting their left style). With Neo.grid.Row components, the Grid.Body's VDOM contains component placeholders, not the deep cell structure. The logic attempting to animate these cells is failing to "reach through" the component boundary or is targeting the wrong VDOM nodes.

Goal:

  • Restore the "Hide Original" behavior for cells during drag start.
  • Restore the live "Slide Animation" for cells during the drag operation to sync with header movements.
  • Refactor SortZone (or Grid.Body) methods to correctly target and update Row component states or VDOM to reflect these temporary positional changes.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions