Skip to content

Commit d3801ba

Browse files
committed
fix(cellnav): when grid has only one focusable column, should navigate up and down
1 parent eec9067 commit d3801ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/features/cellnav/js/cellnav.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
var nextColIndex = curColIndex === 0 ? focusableCols.length - 1 : curColIndex - 1;
129129

130130
//get column to left
131-
if (nextColIndex > curColIndex) {
131+
if (nextColIndex >= curColIndex) {
132132
// On the first row
133133
// if (curRowIndex === 0 && curColIndex === 0) {
134134
// return null;
@@ -160,7 +160,7 @@
160160
}
161161
var nextColIndex = curColIndex === focusableCols.length - 1 ? 0 : curColIndex + 1;
162162

163-
if (nextColIndex < curColIndex) {
163+
if (nextColIndex <= curColIndex) {
164164
if (curRowIndex === focusableRows.length - 1) {
165165
return new GridRowColumn(curRow, focusableCols[nextColIndex]); //return same row
166166
}

0 commit comments

Comments
 (0)