diff --git a/packages/x-data-grid/src/hooks/features/focus/useGridFocus.ts b/packages/x-data-grid/src/hooks/features/focus/useGridFocus.ts index f45197e90ea45..3990d6ca8c6c0 100644 --- a/packages/x-data-grid/src/hooks/features/focus/useGridFocus.ts +++ b/packages/x-data-grid/src/hooks/features/focus/useGridFocus.ts @@ -439,7 +439,7 @@ export const useGridFocus = ( const nextRow = currentPage.rows[clamp(lastFocusedRowIndex, 0, currentPage.rows.length - 1)]; - nextRowId = nextRow.id ?? null; + nextRowId = nextRow?.id ?? null; } apiRef.current.setState((state) => ({