@linzjs/step-ag-grid 14.5.0 → 14.5.1

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
@@ -2,7 +2,7 @@
2
2
  "name": "@linzjs/step-ag-grid",
3
3
  "repository": "github:linz/step-ag-grid.git",
4
4
  "license": "MIT",
5
- "version": "14.5.0",
5
+ "version": "14.5.1",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -97,8 +97,8 @@ export const Grid = ({
97
97
  setOnCellEditingComplete,
98
98
  getColDef,
99
99
  } = useContext(GridContext);
100
- const { updatedDep, updatingCols } = useContext(GridUpdatingContext);
101
- const gridContext = useContext(GridContext);
100
+ const { checkUpdating, updatedDep, updatingCols } = useContext(GridUpdatingContext);
101
+ const { prePopupOps } = useContext(GridContext);
102
102
 
103
103
  const gridDivRef = useRef<HTMLDivElement>(null);
104
104
 
@@ -387,13 +387,23 @@ export const Grid = ({
387
387
  */
388
388
  const startCellEditing = useCallback(
389
389
  (event: CellEvent) => {
390
- event.data.id &&
391
- gridContext.startCellEditing({
392
- rowId: event.data.id,
393
- colId: event.column.getColId(),
390
+ prePopupOps();
391
+ if (!event.node.isSelected()) {
392
+ event.node.setSelected(true, true);
393
+ }
394
+ // Cell already being edited, so don't re-edit until finished
395
+ if (checkUpdating([event.colDef.field ?? ""], event.data.id)) {
396
+ return;
397
+ }
398
+
399
+ if (event.rowIndex !== null) {
400
+ event.api.startEditingCell({
401
+ rowIndex: event.rowIndex,
402
+ colKey: event.column.getColId(),
394
403
  });
404
+ }
395
405
  },
396
- [gridContext],
406
+ [checkUpdating, prePopupOps],
397
407
  );
398
408
 
399
409
  /**