@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/dist/step-ag-grid.esm.js
CHANGED
|
@@ -722,8 +722,8 @@ var Grid = function (_a) {
|
|
|
722
722
|
var _b, _c, _d, _e;
|
|
723
723
|
var dataTestId = _a["data-testid"], _f = _a.rowSelection, rowSelection = _f === void 0 ? "multiple" : _f, _g = _a.suppressColumnVirtualization, suppressColumnVirtualization = _g === void 0 ? true : _g, _h = _a.theme, theme = _h === void 0 ? "ag-theme-alpine" : _h, _j = _a.sizeColumns, sizeColumns = _j === void 0 ? "auto" : _j, _k = _a.selectColumnPinned, selectColumnPinned = _k === void 0 ? null : _k, params = __rest(_a, ["data-testid", "rowSelection", "suppressColumnVirtualization", "theme", "sizeColumns", "selectColumnPinned"]);
|
|
724
724
|
var _l = useContext(GridContext), gridReady = _l.gridReady, setApis = _l.setApis, ensureRowVisible = _l.ensureRowVisible, getFirstRowId = _l.getFirstRowId, selectRowsById = _l.selectRowsById, focusByRowById = _l.focusByRowById, ensureSelectedRowIsVisible = _l.ensureSelectedRowIsVisible, autoSizeColumns = _l.autoSizeColumns, sizeColumnsToFit = _l.sizeColumnsToFit, externallySelectedItemsAreInSync = _l.externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync = _l.setExternallySelectedItemsAreInSync, isExternalFilterPresent = _l.isExternalFilterPresent, doesExternalFilterPass = _l.doesExternalFilterPass, setOnCellEditingComplete = _l.setOnCellEditingComplete, getColDef = _l.getColDef;
|
|
725
|
-
var _m = useContext(GridUpdatingContext), updatedDep = _m.updatedDep, updatingCols = _m.updatingCols;
|
|
726
|
-
var
|
|
725
|
+
var _m = useContext(GridUpdatingContext), checkUpdating = _m.checkUpdating, updatedDep = _m.updatedDep, updatingCols = _m.updatingCols;
|
|
726
|
+
var prePopupOps = useContext(GridContext).prePopupOps;
|
|
727
727
|
var gridDivRef = useRef(null);
|
|
728
728
|
var lastSelectedIds = useRef([]);
|
|
729
729
|
var _o = useState(false), staleGrid = _o[0], setStaleGrid = _o[1];
|
|
@@ -989,12 +989,22 @@ var Grid = function (_a) {
|
|
|
989
989
|
* Make sure node is selected for editing and start edit
|
|
990
990
|
*/
|
|
991
991
|
var startCellEditing = useCallback(function (event) {
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
992
|
+
var _a;
|
|
993
|
+
prePopupOps();
|
|
994
|
+
if (!event.node.isSelected()) {
|
|
995
|
+
event.node.setSelected(true, true);
|
|
996
|
+
}
|
|
997
|
+
// Cell already being edited, so don't re-edit until finished
|
|
998
|
+
if (checkUpdating([(_a = event.colDef.field) !== null && _a !== void 0 ? _a : ""], event.data.id)) {
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
1001
|
+
if (event.rowIndex !== null) {
|
|
1002
|
+
event.api.startEditingCell({
|
|
1003
|
+
rowIndex: event.rowIndex,
|
|
1004
|
+
colKey: event.column.getColId()
|
|
996
1005
|
});
|
|
997
|
-
|
|
1006
|
+
}
|
|
1007
|
+
}, [checkUpdating, prePopupOps]);
|
|
998
1008
|
/**
|
|
999
1009
|
* Handle double click edit
|
|
1000
1010
|
*/
|