@linzjs/step-ag-grid 21.0.1 → 21.0.3

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.
@@ -2364,6 +2364,10 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2364
2364
  const skipHeader = sizeColumns === "auto-skip-headers" && gridRendered === "rows-visible";
2365
2365
  if (sizeColumns === "auto" || skipHeader) {
2366
2366
  const result = autoSizeColumns({ skipHeader, userSizedColIds: userSizedColIds.current, includeFlex: true });
2367
+ if (!result) {
2368
+ needsAutoSize.current = true;
2369
+ return;
2370
+ }
2367
2371
  if (gridRendered === "empty") {
2368
2372
  if (!hasSetContentSizeEmpty.current && result && !hasSetContentSize.current) {
2369
2373
  hasSetContentSizeEmpty.current = true;
@@ -4825,10 +4829,10 @@ const GridContextProvider = (props) => {
4825
4829
  * Resize columns to fit container
4826
4830
  */
4827
4831
  const autoSizeColumns = React.useCallback(({ skipHeader, colIds, userSizedColIds, includeFlex } = {}) => {
4828
- if (!gridApi)
4832
+ if (!gridApi || !gridApi.getColumnState())
4829
4833
  return null;
4830
4834
  const colIdsSet = colIds instanceof Set ? colIds : new Set(colIds);
4831
- const colsToResize = gridApi.getColumnState().filter((colState) => {
4835
+ const colsToResize = gridApi.getColumnState()?.filter?.((colState) => {
4832
4836
  const colId = colState.colId;
4833
4837
  return ((lodashEs.isEmpty(colIdsSet) || colIdsSet.has(colId)) &&
4834
4838
  !userSizedColIds?.has(colId) &&