@linzjs/step-ag-grid 7.6.0 → 7.6.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/dist/GridTheme.scss +10 -9
- package/dist/index.css +0 -5
- package/dist/index.js +17 -8
- package/dist/index.js.map +1 -1
- package/dist/step-ag-grid.esm.js +17 -8
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/GridCell.tsx +11 -2
- package/src/contexts/GridContextProvider.tsx +4 -1
- package/src/contexts/GridPopoverContextProvider.tsx +1 -3
- package/src/styles/Grid.scss +0 -5
- package/src/styles/GridTheme.scss +10 -9
- package/src/utils/deferredPromise.ts +8 -1
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -2266,7 +2266,10 @@ var GridContextProvider = function (props) {
|
|
|
2266
2266
|
case 0:
|
|
2267
2267
|
// Need to refresh to get spinners to work on all rows
|
|
2268
2268
|
gridApi.refreshCells({ rowNodes: props.selectedRows, force: true });
|
|
2269
|
-
return [4 /*yield*/, fnUpdate(selectedRows)]
|
|
2269
|
+
return [4 /*yield*/, fnUpdate(selectedRows)["catch"](function (ex) {
|
|
2270
|
+
console.error("Exception during modifyUpdating", ex);
|
|
2271
|
+
return false;
|
|
2272
|
+
})];
|
|
2270
2273
|
case 1:
|
|
2271
2274
|
ok = _a.sent();
|
|
2272
2275
|
return [2 /*return*/];
|
|
@@ -2414,7 +2417,7 @@ var GridPopoverContextProvider = function (_a) {
|
|
|
2414
2417
|
var selectedRows = useMemo(function () { return (multiEdit ? sortBy(getSelectedRows(), function (row) { return row.id !== props.data.id; }) : [props.data]); }, [getSelectedRows, multiEdit, props.data]);
|
|
2415
2418
|
var field = (_d = (_c = props.colDef) === null || _c === void 0 ? void 0 : _c.field) !== null && _d !== void 0 ? _d : "";
|
|
2416
2419
|
var updateValue = useCallback(function (saveFn, tabDirection) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2417
|
-
var
|
|
2420
|
+
var _a;
|
|
2418
2421
|
return __generator(this, function (_b) {
|
|
2419
2422
|
switch (_b.label) {
|
|
2420
2423
|
case 0:
|
|
@@ -2428,10 +2431,7 @@ var GridPopoverContextProvider = function (_a) {
|
|
|
2428
2431
|
case 2:
|
|
2429
2432
|
_a = _b.sent();
|
|
2430
2433
|
_b.label = 3;
|
|
2431
|
-
case 3:
|
|
2432
|
-
r = _a;
|
|
2433
|
-
//if (r) stopEditing();
|
|
2434
|
-
return [2 /*return*/, r];
|
|
2434
|
+
case 3: return [2 /*return*/, _a];
|
|
2435
2435
|
}
|
|
2436
2436
|
});
|
|
2437
2437
|
}); }, [field, saving, selectedRows, updatingCells]);
|
|
@@ -2868,7 +2868,7 @@ var GridCellRenderer = function (props) {
|
|
|
2868
2868
|
var GridCell = function (props, custom) {
|
|
2869
2869
|
var _a;
|
|
2870
2870
|
return __assign(__assign(__assign(__assign(__assign(__assign({ colId: props.field, sortable: !!((props === null || props === void 0 ? void 0 : props.field) || (props === null || props === void 0 ? void 0 : props.valueGetter)), resizable: true }, ((custom === null || custom === void 0 ? void 0 : custom.editor) && {
|
|
2871
|
-
cellClassRules: GridCellMultiSelectClassRules,
|
|
2871
|
+
cellClassRules: custom.multiEdit ? GridCellMultiSelectClassRules : undefined,
|
|
2872
2872
|
editable: (_a = props.editable) !== null && _a !== void 0 ? _a : true,
|
|
2873
2873
|
cellEditor: GenericCellEditorComponentWrapper(custom)
|
|
2874
2874
|
})), { suppressKeyboardEvent: function (e) {
|
|
@@ -2891,7 +2891,10 @@ var GridCell = function (props, custom) {
|
|
|
2891
2891
|
};
|
|
2892
2892
|
var GenericCellEditorComponentWrapper = function (custom) {
|
|
2893
2893
|
return forwardRef(function GenericCellEditorComponentFr(cellEditorParams, _) {
|
|
2894
|
-
|
|
2894
|
+
var valueFormatted = cellEditorParams.formatValue
|
|
2895
|
+
? cellEditorParams.formatValue(cellEditorParams.value)
|
|
2896
|
+
: "Missing formatter";
|
|
2897
|
+
return (jsxs(GridPopoverContextProvider, __assign({ props: cellEditorParams }, { children: [jsx(cellEditorParams.colDef.cellRenderer, __assign({}, cellEditorParams, { valueFormatted: valueFormatted }, cellEditorParams.colDef.cellRendererParams)), (custom === null || custom === void 0 ? void 0 : custom.editor) && jsx(custom.editor, __assign({}, cellEditorParams))] })));
|
|
2895
2898
|
});
|
|
2896
2899
|
};
|
|
2897
2900
|
|
|
@@ -4419,6 +4422,12 @@ var ActionButton = function (_a) {
|
|
|
4419
4422
|
var useDeferredPromise = function () {
|
|
4420
4423
|
var promiseResolve = useRef();
|
|
4421
4424
|
var promiseReject = useRef();
|
|
4425
|
+
// End promise on unload
|
|
4426
|
+
useEffect(function () {
|
|
4427
|
+
return function () {
|
|
4428
|
+
promiseReject.current && promiseReject.current();
|
|
4429
|
+
};
|
|
4430
|
+
}, []);
|
|
4422
4431
|
return {
|
|
4423
4432
|
invoke: function () {
|
|
4424
4433
|
return new Promise(function (resolve, reject) {
|