@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
package/src/components/Grid.tsx
CHANGED
|
@@ -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
|
|
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
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
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
|
-
[
|
|
406
|
+
[checkUpdating, prePopupOps],
|
|
397
407
|
);
|
|
398
408
|
|
|
399
409
|
/**
|