@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.
@@ -747,12 +747,19 @@ var Grid = function (_a) {
747
747
  var hasSetContentSizeEmpty = useRef(false);
748
748
  var needsAutoSize = useRef(false);
749
749
  var setInitialContentSize = useCallback(function () {
750
- var _a;
750
+ var _a, _b, _c;
751
751
  if (!((_a = gridDivRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth)) {
752
752
  // Don't resize grids if they are offscreen as it doesn't work.
753
753
  needsAutoSize.current = true;
754
754
  return;
755
755
  }
756
+ var headerCellCount = (_c = (_b = gridDivRef.current) === null || _b === void 0 ? void 0 : _b.getElementsByClassName("ag-header-cell-label")) === null || _c === void 0 ? void 0 : _c.length;
757
+ if (headerCellCount != params.columnDefs.length) {
758
+ // Don't resize grids until all the columns are visible
759
+ // as `autoSizeColumns` will fail silently in this case
760
+ needsAutoSize.current = true;
761
+ return;
762
+ }
756
763
  var skipHeader = sizeColumns === "auto-skip-headers" && !isEmpty(params.rowData);
757
764
  if (sizeColumns === "auto" || skipHeader) {
758
765
  var result = autoSizeColumns({ skipHeader: skipHeader, userSizedColIds: userSizedColIds.current });