@linzjs/step-ag-grid 14.7.0 → 14.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": "14.7.0",
5
+ "version": "14.7.1",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -121,6 +121,15 @@ export const Grid = ({
121
121
  needsAutoSize.current = true;
122
122
  return;
123
123
  }
124
+
125
+ const headerCellCount = gridDivRef.current?.getElementsByClassName("ag-header-cell-label")?.length;
126
+ if (headerCellCount != params.columnDefs.length) {
127
+ // Don't resize grids until all the columns are visible
128
+ // as `autoSizeColumns` will fail silently in this case
129
+ needsAutoSize.current = true;
130
+ return;
131
+ }
132
+
124
133
  const skipHeader = sizeColumns === "auto-skip-headers" && !isEmpty(params.rowData);
125
134
  if (sizeColumns === "auto" || skipHeader) {
126
135
  const result = autoSizeColumns({ skipHeader, userSizedColIds: userSizedColIds.current });