@linzjs/step-ag-grid 21.1.0 → 21.1.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.
@@ -2347,6 +2347,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2347
2347
  const hasSetContentSize = useRef(false);
2348
2348
  const hasSetContentSizeEmpty = useRef(false);
2349
2349
  const needsAutoSize = useRef(true);
2350
+ const lastFullResize = useRef();
2350
2351
  const setInitialContentSize = useCallback(() => {
2351
2352
  if (!gridDivRef.current?.clientWidth || rowData == null) {
2352
2353
  // Don't resize grids if they are offscreen as it doesn't work.
@@ -2374,8 +2375,14 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2374
2375
  }
2375
2376
  else if (gridRendered === "rows-visible") {
2376
2377
  if (!hasSetContentSize.current) {
2377
- hasSetContentSize.current = true;
2378
- params.onContentSize?.(result);
2378
+ if (lastFullResize.current === result.width) {
2379
+ hasSetContentSize.current = true;
2380
+ params.onContentSize?.(result);
2381
+ }
2382
+ else {
2383
+ needsAutoSize.current = true;
2384
+ }
2385
+ lastFullResize.current = result.width;
2379
2386
  }
2380
2387
  }
2381
2388
  else {