baaz-custom-components 5.0.23 → 5.0.25

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/index.js CHANGED
@@ -2322,6 +2322,14 @@ var Grid = (0, import_react6.forwardRef)(
2322
2322
  });
2323
2323
  }
2324
2324
  }, [columns, data]);
2325
+ (0, import_react6.useEffect)(() => {
2326
+ if (!containerRef.current) return;
2327
+ const observer = new ResizeObserver(() => {
2328
+ resizeColumns();
2329
+ });
2330
+ observer.observe(containerRef.current);
2331
+ return () => observer.disconnect();
2332
+ }, [resizeColumns]);
2325
2333
  const init = (0, import_react6.useCallback)(
2326
2334
  (api) => {
2327
2335
  apiRef.current = api;
package/dist/index.mjs CHANGED
@@ -1909,7 +1909,13 @@ var CustomBreadcrumb = ({
1909
1909
  var breadcrumb_default = CustomBreadcrumb;
1910
1910
 
1911
1911
  // src/components/custom/grid/index.tsx
1912
- import { useCallback as useCallback2, useRef as useRef2, useImperativeHandle, forwardRef } from "react";
1912
+ import {
1913
+ useCallback as useCallback2,
1914
+ useRef as useRef2,
1915
+ useImperativeHandle,
1916
+ forwardRef,
1917
+ useEffect as useEffect6
1918
+ } from "react";
1913
1919
  import { Grid as SvarGrid, WillowDark } from "@svar-ui/react-grid";
1914
1920
 
1915
1921
  // src/utils/exportPdf.ts
@@ -2294,6 +2300,14 @@ var Grid = forwardRef(
2294
2300
  });
2295
2301
  }
2296
2302
  }, [columns, data]);
2303
+ useEffect6(() => {
2304
+ if (!containerRef.current) return;
2305
+ const observer = new ResizeObserver(() => {
2306
+ resizeColumns();
2307
+ });
2308
+ observer.observe(containerRef.current);
2309
+ return () => observer.disconnect();
2310
+ }, [resizeColumns]);
2297
2311
  const init = useCallback2(
2298
2312
  (api) => {
2299
2313
  apiRef.current = api;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baaz-custom-components",
3
- "version": "5.0.23",
3
+ "version": "5.0.25",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "main": "dist/index.js",