@linzjs/step-ag-grid 14.3.0 → 14.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/components/Grid.tsx
CHANGED
|
@@ -411,36 +411,29 @@ export const GridContextProvider = <RowType extends GridBaseRow>(props: GridCont
|
|
|
411
411
|
);
|
|
412
412
|
};
|
|
413
413
|
|
|
414
|
-
let foundEditableCell = false;
|
|
415
|
-
|
|
416
414
|
// Just in case I've missed something, we don't want the loop to hang everything
|
|
417
|
-
let maxIterations = 50;
|
|
418
|
-
|
|
419
|
-
let postRow: CellPosition | null = null;
|
|
420
|
-
do {
|
|
421
|
-
preRow = gridApi.getFocusedCell();
|
|
415
|
+
for (let maxIterations = 0; maxIterations < 50; maxIterations++) {
|
|
416
|
+
const preRow = gridApi.getFocusedCell();
|
|
422
417
|
tabDirection === 1 ? gridApi.tabToNextCell() : gridApi.tabToPreviousCell();
|
|
423
|
-
postRow = gridApi.getFocusedCell();
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
});
|
|
440
|
-
return false;
|
|
418
|
+
const postRow = gridApi.getFocusedCell();
|
|
419
|
+
if (preRow?.rowIndex !== postRow?.rowIndex || preRow?.column === postRow?.column) {
|
|
420
|
+
// We didn't find an editable cell in the same row, or the cell column didn't change
|
|
421
|
+
// implying it was start/end of grid
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
if (focusedCellIsEditable()) {
|
|
425
|
+
const focusedCell = gridApi?.getFocusedCell();
|
|
426
|
+
if (focusedCell) {
|
|
427
|
+
prePopupOps();
|
|
428
|
+
gridApi.startEditingCell({
|
|
429
|
+
rowIndex: focusedCell.rowIndex,
|
|
430
|
+
colKey: focusedCell.column.getColId(),
|
|
431
|
+
});
|
|
432
|
+
return true;
|
|
433
|
+
}
|
|
441
434
|
}
|
|
442
435
|
}
|
|
443
|
-
return
|
|
436
|
+
return false;
|
|
444
437
|
},
|
|
445
438
|
[gridApi, prePopupOps],
|
|
446
439
|
);
|
|
@@ -494,7 +487,7 @@ export const GridContextProvider = <RowType extends GridBaseRow>(props: GridCont
|
|
|
494
487
|
prePopupFocusedCell.current.rowIndex == postPopupFocusedCell.rowIndex &&
|
|
495
488
|
prePopupFocusedCell.current.column.getColId() == postPopupFocusedCell.column.getColId()
|
|
496
489
|
) {
|
|
497
|
-
if (!tabDirection || selectNextEditableCell(tabDirection)) {
|
|
490
|
+
if (!tabDirection || !selectNextEditableCell(tabDirection)) {
|
|
498
491
|
cellEditingCompleteCallbackRef.current && cellEditingCompleteCallbackRef.current();
|
|
499
492
|
}
|
|
500
493
|
}
|