Skip to content

Commit

Permalink
handle edge node condition for 0th column
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchit3008 authored Jul 22, 2024
1 parent bbdeb3b commit a30fc01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/events/keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function moveToEdge(
let r = colDelta === 0 ? selectedLimit : curr;
let c = colDelta === 0 ? curr : selectedLimit;

while (r > 0 && c > 0 && (colDelta === 0 ? r : c) < maxRowCol - 1) {
while (r >= 0 && c >= 0 && (colDelta === 0 ? r : c) < maxRowCol - 1) {
if (
!_.isNil(sheetData?.[r]?.[c]?.v) &&
(_.isNil(sheetData?.[r - rowDelta]?.[c - colDelta]?.v) ||
Expand Down

0 comments on commit a30fc01

Please sign in to comment.