@linzjs/step-ag-grid 17.6.0 → 17.6.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": "17.6.0",
5
+ "version": "17.6.1",
6
6
  "keywords": [
7
7
  "aggrid",
8
8
  "ag-grid",
@@ -108,7 +108,8 @@ export const GridContextProvider = <RowType extends GridBaseRow>(props: PropsWit
108
108
  * Used to check if it's OK to autosize.
109
109
  */
110
110
  const gridRenderState = useCallback((): null | "empty" | "rows-visible" => {
111
- if (!gridApi) return null;
111
+ // Even though getModel can't be null, sometimes it is
112
+ if (!gridApi || !gridApi.getModel()) return null;
112
113
  if (!gridApi.getModel().isRowsToRender()) return "empty";
113
114
  if (!isEmpty(gridApi.getRenderedNodes())) return "rows-visible";
114
115
  // If there are rows to render, but there are no rendered nodes then we should wait