From 3fad22ee0e78b29218521c92b9f34de69c079871 Mon Sep 17 00:00:00 2001 From: Marcello Fuschi Date: Sat, 11 Oct 2025 17:07:16 +0200 Subject: [PATCH] Make selectCell use the passed shouldFocusCell parameter even if same position --- src/DataGrid.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DataGrid.tsx b/src/DataGrid.tsx index 27d34b0ab7..fd11c5277a 100644 --- a/src/DataGrid.tsx +++ b/src/DataGrid.tsx @@ -839,6 +839,7 @@ export function DataGrid(props: DataGridPr setSelectedPosition({ ...position, mode: 'EDIT', row, originalRow: row }); } else if (samePosition) { // Avoid re-renders if the selected cell state is the same + setShouldFocusCell(options?.shouldFocusCell === true); scrollIntoView(getCellToScroll(gridRef.current!)); } else { setShouldFocusCell(options?.shouldFocusCell === true);