Skip to content

Commit 78d9c63

Browse files
authored
Check column bounds (adazzle#3764)
1 parent 0e97599 commit 78d9c63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/selectedCellUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export function getNextSelectedCellPosition<R, SR>({
207207
}
208208
}
209209

210-
if (nextRowIdx < mainHeaderRowIdx) {
210+
if (nextRowIdx < mainHeaderRowIdx && nextIdx > -1 && nextIdx < columnsCount) {
211211
// Find the last reachable parent for the new rowIdx
212212
// This check is needed when navigating to a column
213213
// that does not have a parent matching the new rowIdx

0 commit comments

Comments
 (0)