@linzjs/step-ag-grid 32.6.0 → 32.7.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": "32.6.0",
5
+ "version": "32.7.1",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -59,7 +59,7 @@
59
59
  "build-storybook": "storybook build",
60
60
  "deploy-storybook": "npx --yes -p @storybook/storybook-deployer storybook-to-ghpages",
61
61
  "chromatic": "chromatic --exit-zero-on-changes",
62
- "upgrade": "npx npm-check-updates -i --format group -c 1d",
62
+ "update": "npx npm-check-updates -i --format group -c 1d",
63
63
  "prepare": "husky"
64
64
  },
65
65
  "browserslist": {
@@ -76,7 +76,7 @@
76
76
  },
77
77
  "devDependencies": {
78
78
  "@chromatic-com/storybook": "^5.3.0",
79
- "@linzjs/lui": "^24.20.0",
79
+ "@linzjs/lui": "^26.0.0",
80
80
  "@linzjs/windows": "^15.0.0",
81
81
  "@rollup/plugin-commonjs": "^29.0.3",
82
82
  "@rollup/plugin-json": "^6.1.0",
@@ -862,20 +862,24 @@ export const Grid = <TData extends GridBaseRow = GridBaseRow>({
862
862
 
863
863
  const startDragYRef = useRef<number | null>(null);
864
864
 
865
+ const getGridRoot = useCallback(() => gridDivRef.current ?? document, []);
866
+
865
867
  const clearHighlightRowClasses = useCallback(() => {
866
- document.querySelectorAll(`.ag-row-highlight-above`)?.forEach((el) => {
868
+ const gridRoot = getGridRoot();
869
+ gridRoot.querySelectorAll(`.ag-row-highlight-above`)?.forEach((el) => {
867
870
  el.classList.remove('ag-row-highlight-above');
868
871
  });
869
- document.querySelectorAll(`.ag-row-highlight-below`)?.forEach((el) => {
872
+ gridRoot.querySelectorAll(`.ag-row-highlight-below`)?.forEach((el) => {
870
873
  el.classList.remove('ag-row-highlight-below');
871
874
  });
872
- }, []);
875
+ }, [getGridRoot]);
873
876
 
874
877
  const clearDragRowClasses = useCallback(() => {
875
- document.querySelectorAll(`.ag-row-dragging`)?.forEach((el) => {
878
+ const gridRoot = getGridRoot();
879
+ gridRoot.querySelectorAll(`.ag-row-dragging`)?.forEach((el) => {
876
880
  el.classList.remove('ag-row-dragging');
877
881
  });
878
- }, []);
882
+ }, [getGridRoot]);
879
883
 
880
884
  const gridElementRef = useRef<Element>(undefined);
881
885
  const multiDragAppliedRef = useRef(false);