@linzjs/step-ag-grid 14.3.1 → 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.
@@ -4968,32 +4968,29 @@ var GridContextProvider = function (props) {
4968
4968
  !((_a = nextColDef.cellEditorParams) === null || _a === void 0 ? void 0 : _a.preventAutoEdit) &&
4969
4969
  !((_b = nextColDef.cellRendererParams) === null || _b === void 0 ? void 0 : _b.editAction));
4970
4970
  };
4971
- var foundEditableCell = false;
4972
4971
  // Just in case I've missed something, we don't want the loop to hang everything
4973
- var maxIterations = 50;
4974
- var preRow = null;
4975
- var postRow = null;
4976
- do {
4977
- preRow = gridApi.getFocusedCell();
4972
+ for (var maxIterations = 0; maxIterations < 50; maxIterations++) {
4973
+ var preRow = gridApi.getFocusedCell();
4978
4974
  tabDirection === 1 ? gridApi.tabToNextCell() : gridApi.tabToPreviousCell();
4979
- postRow = gridApi.getFocusedCell();
4980
- foundEditableCell = focusedCellIsEditable();
4981
- } while ((preRow === null || preRow === void 0 ? void 0 : preRow.rowIndex) === (postRow === null || postRow === void 0 ? void 0 : postRow.rowIndex) &&
4982
- (preRow === null || preRow === void 0 ? void 0 : preRow.column) !== (postRow === null || postRow === void 0 ? void 0 : postRow.column) &&
4983
- !foundEditableCell &&
4984
- maxIterations-- > 0);
4985
- if (foundEditableCell) {
4986
- prePopupOps();
4987
- var focusedCell = gridApi === null || gridApi === void 0 ? void 0 : gridApi.getFocusedCell();
4988
- if (focusedCell) {
4989
- gridApi.startEditingCell({
4990
- rowIndex: focusedCell.rowIndex,
4991
- colKey: focusedCell.column.getColId()
4992
- });
4993
- return false;
4975
+ var postRow = gridApi.getFocusedCell();
4976
+ if ((preRow === null || preRow === void 0 ? void 0 : preRow.rowIndex) !== (postRow === null || postRow === void 0 ? void 0 : postRow.rowIndex) || (preRow === null || preRow === void 0 ? void 0 : preRow.column) === (postRow === null || postRow === void 0 ? void 0 : postRow.column)) {
4977
+ // We didn't find an editable cell in the same row, or the cell column didn't change
4978
+ // implying it was start/end of grid
4979
+ break;
4980
+ }
4981
+ if (focusedCellIsEditable()) {
4982
+ var focusedCell = gridApi === null || gridApi === void 0 ? void 0 : gridApi.getFocusedCell();
4983
+ if (focusedCell) {
4984
+ prePopupOps();
4985
+ gridApi.startEditingCell({
4986
+ rowIndex: focusedCell.rowIndex,
4987
+ colKey: focusedCell.column.getColId()
4988
+ });
4989
+ return true;
4990
+ }
4994
4991
  }
4995
4992
  }
4996
- return true;
4993
+ return false;
4997
4994
  }, [gridApi, prePopupOps]);
4998
4995
  var updatingCells = useCallback(function (props, fnUpdate, setSaving, tabDirection) { return __awaiter(void 0, void 0, void 0, function () {
4999
4996
  return __generator(this, function (_a) {
@@ -5045,7 +5042,7 @@ var GridContextProvider = function (props) {
5045
5042
  postPopupFocusedCell &&
5046
5043
  prePopupFocusedCell.current.rowIndex == postPopupFocusedCell.rowIndex &&
5047
5044
  prePopupFocusedCell.current.column.getColId() == postPopupFocusedCell.column.getColId()) {
5048
- if (!tabDirection || selectNextEditableCell(tabDirection)) {
5045
+ if (!tabDirection || !selectNextEditableCell(tabDirection)) {
5049
5046
  cellEditingCompleteCallbackRef.current && cellEditingCompleteCallbackRef.current();
5050
5047
  }
5051
5048
  }