Skip to content

Commit

Permalink
[DataGrid] Fix row reorder with cell selection (@PEsteves8) (mui#11878)
Browse files Browse the repository at this point in the history
Co-authored-by: P. Esteves <[email protected]>
  • Loading branch information
github-actions[bot] and PEsteves8 authored Feb 8, 2024
1 parent 3e4ec38 commit 8c55dc1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
gridClasses,
gridFocusCellSelector,
GridCellParams,
GRID_REORDER_COL_DEF,
} from '@mui/x-data-grid-pro';
import { gridCellSelectionStateSelector } from './gridCellSelectionSelector';
import { GridCellSelectionApi } from './gridCellSelectionInterfaces';
Expand Down Expand Up @@ -223,6 +224,10 @@ export const useGridCellSelection = (
return;
}

if (params.field === GRID_REORDER_COL_DEF.field) {
return;
}

const focusedCell = gridFocusCellSelector(apiRef);
if (hasClickedValidCellForRangeSelection(params) && event.shiftKey && focusedCell) {
event.preventDefault();
Expand Down

0 comments on commit 8c55dc1

Please sign in to comment.