@linzjs/step-ag-grid 30.1.0 → 30.2.0
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 +12 -0
- package/dist/step-ag-grid.cjs +24 -17
- package/dist/step-ag-grid.cjs.map +1 -1
- package/dist/step-ag-grid.esm.js +24 -17
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/gridPopoverEdit/{GridPopoverEditDropDown.ts → GridPopoverEditDropDown.tsx} +10 -2
- package/src/contexts/GridContextProvider.tsx +13 -8
- package/src/styles/GridTheme.scss +12 -0
package/dist/step-ag-grid.esm.js
CHANGED
|
@@ -63820,16 +63820,22 @@ const GridPopoverEditBearingCorrection = (colDef, props) => GridPopoverEditBeari
|
|
|
63820
63820
|
},
|
|
63821
63821
|
});
|
|
63822
63822
|
|
|
63823
|
-
const GridPopoverEditDropDown = (colDef, props) =>
|
|
63824
|
-
|
|
63825
|
-
|
|
63826
|
-
|
|
63827
|
-
|
|
63828
|
-
|
|
63829
|
-
|
|
63830
|
-
|
|
63831
|
-
|
|
63832
|
-
|
|
63823
|
+
const GridPopoverEditDropDown = (colDef, props) => {
|
|
63824
|
+
colDef.cellRendererParams = {
|
|
63825
|
+
rightHoverElement: (jsx(GridIcon, { icon: 'ic_arrow_drop_down', title: '', className: 'GridCell-editableIcon GridCell-dropDownIcon' })),
|
|
63826
|
+
...colDef.cellRendererParams,
|
|
63827
|
+
};
|
|
63828
|
+
return GridCell(colDef, {
|
|
63829
|
+
editor: GridFormDropDown,
|
|
63830
|
+
...props,
|
|
63831
|
+
editorParams: {
|
|
63832
|
+
...props.editorParams,
|
|
63833
|
+
className: clsx({
|
|
63834
|
+
'GridPopoverEditDropDown-containerLarge': !props.editorParams?.className?.includes('GridPopoverEditDropDown-container'),
|
|
63835
|
+
}, props.editorParams?.className),
|
|
63836
|
+
},
|
|
63837
|
+
});
|
|
63838
|
+
};
|
|
63833
63839
|
|
|
63834
63840
|
const GridRenderPopoutMenuCell = (props) => {
|
|
63835
63841
|
const disabled = !fnOrVar(props.colDef?.editable, props);
|
|
@@ -63912,8 +63918,14 @@ const GridContextProvider = (props) => {
|
|
|
63912
63918
|
const enableMultilineBulkEditRef = useRef(false);
|
|
63913
63919
|
const idsBeforeUpdate = useRef([]);
|
|
63914
63920
|
const prePopupFocusedCell = useRef();
|
|
63915
|
-
const [externallySelectedItemsAreInSync,
|
|
63921
|
+
const [externallySelectedItemsAreInSync, _setExternallySelectedItemsAreInSync] = useState(false);
|
|
63916
63922
|
const externalFilters = useRef([]);
|
|
63923
|
+
// waitForExternallySelectedItemsToBeInSync can't use the state as it won't be updated during function execution
|
|
63924
|
+
const externallySelectedItemsAreInSyncRef = useRef(false);
|
|
63925
|
+
const setExternallySelectedItemsAreInSync = useCallback((cond) => {
|
|
63926
|
+
_setExternallySelectedItemsAreInSync(cond);
|
|
63927
|
+
externallySelectedItemsAreInSyncRef.current = cond;
|
|
63928
|
+
}, [_setExternallySelectedItemsAreInSync]);
|
|
63917
63929
|
const setQuickFilter = useCallback((filter) => {
|
|
63918
63930
|
// If we don't clear the focused cell focus switches back to grid when typing in the quick filter input
|
|
63919
63931
|
gridApi?.clearFocusedCell();
|
|
@@ -64260,11 +64272,6 @@ const GridContextProvider = (props) => {
|
|
|
64260
64272
|
});
|
|
64261
64273
|
}
|
|
64262
64274
|
}, [gridApi]);
|
|
64263
|
-
// waitForExternallySelectedItemsToBeInSync can't use the state as it won't be updated during function execution
|
|
64264
|
-
const externallySelectedItemsAreInSyncRef = useRef(false);
|
|
64265
|
-
useEffect(() => {
|
|
64266
|
-
externallySelectedItemsAreInSyncRef.current = externallySelectedItemsAreInSync;
|
|
64267
|
-
}, [externallySelectedItemsAreInSync]);
|
|
64268
64275
|
const waitForExternallySelectedItemsToBeInSync = useCallback(async () => {
|
|
64269
64276
|
if (!hasExternallySelectedItemsRef.current) {
|
|
64270
64277
|
externallySelectedItemsAreInSyncRef.current = true;
|
|
@@ -64320,7 +64327,7 @@ const GridContextProvider = (props) => {
|
|
|
64320
64327
|
finally {
|
|
64321
64328
|
startCellEditingInProgressRef.current = false;
|
|
64322
64329
|
}
|
|
64323
|
-
}, [anyUpdating, gridApi, prePopupOps, waitForExternallySelectedItemsToBeInSync]);
|
|
64330
|
+
}, [anyUpdating, gridApi, prePopupOps, setExternallySelectedItemsAreInSync, waitForExternallySelectedItemsToBeInSync]);
|
|
64324
64331
|
const bulkEditingCompleteCallbackRef = useRef();
|
|
64325
64332
|
const onBulkEditingComplete = useCallback(async () => {
|
|
64326
64333
|
await bulkEditingCompleteCallbackRef.current?.();
|