Skip to content

Commit 8f53459

Browse files
committed
Merge pull request #4874 from Servoy/cellnav_onnavigate
Cellnav onnavigate called too often
2 parents 1dc9931 + e31ac53 commit 8f53459

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/features/cellnav/js/cellnav.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,10 @@
681681
if (grid.cellNav.lastRowCol === null || rowColSelectIndex === -1) {
682682
var newRowCol = new GridRowColumn(row, col);
683683

684-
grid.api.cellNav.raise.navigate(newRowCol, grid.cellNav.lastRowCol);
685-
grid.cellNav.lastRowCol = newRowCol;
684+
if (grid.cellNav.lastRowCol === null || grid.cellNav.lastRowCol.row !== newRowCol.row || grid.cellNav.lastRowCol.col !== newRowCol.col){
685+
grid.api.cellNav.raise.navigate(newRowCol, grid.cellNav.lastRowCol);
686+
grid.cellNav.lastRowCol = newRowCol;
687+
}
686688
if (uiGridCtrl.grid.options.modifierKeysToMultiSelectCells && modifierDown) {
687689
grid.cellNav.focusedCells.push(rowCol);
688690
} else {

0 commit comments

Comments
 (0)