@linzjs/step-ag-grid 21.0.2 → 21.0.4

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.
@@ -2369,13 +2369,13 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2369
2369
  return;
2370
2370
  }
2371
2371
  if (gridRendered === "empty") {
2372
- if (!hasSetContentSizeEmpty.current && result && !hasSetContentSize.current) {
2372
+ if (!hasSetContentSizeEmpty.current && !hasSetContentSize.current) {
2373
2373
  hasSetContentSizeEmpty.current = true;
2374
2374
  params.onContentSize?.(result);
2375
2375
  }
2376
2376
  }
2377
2377
  else if (gridRendered === "rows-visible") {
2378
- if (result && !hasSetContentSize.current) {
2378
+ if (!hasSetContentSize.current) {
2379
2379
  hasSetContentSize.current = true;
2380
2380
  params.onContentSize?.(result);
2381
2381
  }
@@ -2586,7 +2586,9 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2586
2586
  if (!lodashEs.isEmpty(updatingCols()))
2587
2587
  return;
2588
2588
  const skipHeader = sizeColumns === "auto-skip-headers";
2589
- autoSizeColumns({ skipHeader, userSizedColIds: userSizedColIds.current, colIds: colIdsEdited.current });
2589
+ if (hasSetContentSize.current) {
2590
+ autoSizeColumns({ skipHeader, userSizedColIds: userSizedColIds.current, colIds: colIdsEdited.current });
2591
+ }
2590
2592
  colIdsEdited.current.clear();
2591
2593
  }, [autoSizeColumns, rowData?.length, setInitialContentSize, sizeColumns, updatedDep, updatingCols]);
2592
2594
  /**
@@ -2699,11 +2701,15 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2699
2701
  if (!lodashEs.isEmpty(colIdsEdited.current)) {
2700
2702
  const skipHeader = sizeColumns === "auto-skip-headers";
2701
2703
  if (sizeColumns === "auto" || skipHeader) {
2702
- lodashEs.defer(() => autoSizeColumns({
2703
- skipHeader,
2704
- userSizedColIds: userSizedColIds.current,
2705
- colIds: colIdsEdited.current,
2706
- }));
2704
+ lodashEs.defer(() => {
2705
+ if (hasSetContentSize.current) {
2706
+ autoSizeColumns({
2707
+ skipHeader,
2708
+ userSizedColIds: userSizedColIds.current,
2709
+ colIds: colIdsEdited.current,
2710
+ });
2711
+ }
2712
+ });
2707
2713
  }
2708
2714
  colIdsEdited.current.clear();
2709
2715
  }