Skip to content

[data grid] Row reordering not working on cells with column reorder disabled #18889

@MBilalShafi

Description

@MBilalShafi

Steps to reproduce

Steps:

  1. Open this link to live example: https://stackblitz.com/edit/qsyrrzxn?file=src%2FDemo.tsx
  2. Try to drag a row over any cell other than row reorder cell (with reorder icon)
  3. Notice dropping doesn't reorder the row

Current behavior

It is not possible to perform row reorder by dropping on a cell which has cell reorder disabled.

Expected behavior

It should be possible to reorder anywhere in the Data Grid

Context

Discovered while working on #18251

Here's the culprit:

const disableDragEvents = !(canReorderColumn || (isReorderCell && canReorderRow));

We have to introduce some kind of state which gets set on rowDragStart and gets cleared on rowDragEnd.

Your environment

Not relevant

Search keywords: reorder, row reorder

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature: ReorderingRelated to the data grid Reordering featureplan: ProImpact at least one Pro user.scope: data gridChanges related to the data grid.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions