@opencorestack/opengridx 3.0.0 → 3.0.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/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # OpenGridX — AI Agent Context
2
2
  # Package: @opencorestack/opengridx
3
- # Version: 3.0.0
3
+ # Version: 3.0.1
4
4
  # Docs: https://opencorestack.github.io/OpenGridX/
5
5
  # This file is machine-readable. AI developers: start here.
6
6
 
@@ -71,7 +71,7 @@ export default function App() {
71
71
  ### Display
72
72
  | Prop | Type | Default | Description |
73
73
  |-------------------|-----------|---------|----------------------------------------|
74
- | height | number/string | — | Grid height. No default. The grid must have a BOUNDED height or it renders every row (see GOTCHAS) |
74
+ | height | number/string | — | Grid height. No default: fills its container (class ogx--fill, 3.0.1+); the container must have a BOUNDED height or it renders every row (see GOTCHAS) |
75
75
  | autoHeight | boolean | false | Fit height to rows (renders every row) |
76
76
  | overscanRowCount | number | 3 | Minimum rows rendered outside the viewport (raised automatically while scrolling fast) |
77
77
  | ariaLabel | string | — | Accessible name for the grid |
@@ -211,12 +211,12 @@ There are no getRowClassName / getCellClassName / theme props: use GridColDef.ce
211
211
  | Prop | Type | Description |
212
212
  |--------------|------------------|----------------------------------------------|
213
213
  | initialState | GridInitialState | Starting sorting, filter, pagination, columns (widths, order, pinning, visibility) and density. Read at mount only |
214
- | apiRef | MutableRefObject<GridApi> | Imperative API handle from useGridApiRef() |
214
+ | apiRef | MutableRefObject<GridApi<R>> or MutableRefObject<GridApi> | Imperative API handle from useGridApiRef<R>() (typed row getters) or useGridApiRef() |
215
215
 
216
216
  ### List View
217
217
  | Prop | Type | Description |
218
218
  |----------------|--------------------|---------------------------------------------|
219
- | listView | boolean | Render as cards instead of a table (requires listViewColumn; without it the grid view shows + dev warning). Honours loading, noRowsOverlay/loadingOverlay and slots.footer; rows are a roving Tab stop (arrows, Home/End, PageUp/Down, Enter/Space, Alt+Arrow expand); tree/group parents get a chevron. Not virtualized |
219
+ | listView | boolean | Render as cards instead of a table (requires listViewColumn; without it the grid view shows + dev warning). Honours loading, noRowsOverlay/loadingOverlay and slots.footer; rows are a roving Tab stop (arrows, Home/End, PageUp/Down, Enter/Space, Alt+Arrow expand); tree/group parents get a chevron. Not virtualized (dev warning above 2,000 items; paginate) |
220
220
  | listViewColumn | { field, renderCell } | Defines the card renderer |
221
221
 
222
222
  ---
@@ -269,7 +269,7 @@ const apiRef = useGridApiRef();
269
269
  <DataGrid apiRef={apiRef} rows={rows} columns={columns} />
270
270
 
271
271
  // Row access
272
- apiRef.current.getRow(id) // → GridRowModel | null
272
+ apiRef.current.getRow(id) // → R | null with useGridApiRef<R>(), else GridRowModel | null
273
273
  apiRef.current.getAllRows() // → every loaded row
274
274
  apiRef.current.getVisibleRows() // → rows on screen: current page + pinned rows
275
275
  apiRef.current.getAllFilteredRows() // → every filtered + sorted row, all pages (use for exports); tree data + filter: matching rows only
@@ -599,7 +599,7 @@ Arrows move between cells (skipping hidden columns); Home/End, Ctrl+Home/End, Pa
599
599
  8. **`initialState.columns.columnWidths`**: accepts `Record<string, number>` to restore saved column widths. Every part of `initialState` is optional.
600
600
  9. **`pinnedColumns`** and **`columnWidths`** are independent state — pinning does not reset widths.
601
601
  10. **Aggregation**: setting `aggregationModel` alone renders a sticky footer with the totals; with `rowGroupingModel` each group row also shows its own aggregates. `null`/`undefined`, blank strings, booleans and arrays are ignored by sum/avg/min/max; min/max of dates return a `Date`; `valueGetter` columns aggregate the computed value; footer totals go through the column's `valueFormatter` (not for count/unique).
602
- 11. **GOTCHAS — bounded height**: virtualization only works if the grid's container has a bounded height. A flex child without `min-height: 0` grows to fit every row, so every row is rendered. Pagination hides this, and row grouping turns pagination off. Use `<div style={{ flex: 1, minHeight: 0 }}>` around `height="100%"`, or pass a fixed pixel `height`. Dev builds log a warning when this happens.
602
+ 11. **GOTCHAS — bounded height**: virtualization only works if the grid's container has a bounded height. A flex child without `min-height: 0` grows to fit every row, so every row is rendered. Pagination hides this, and row grouping turns pagination off. Without a `height` prop the grid fills its container (3.0.1+), so use `<div style={{ flex: 1, minHeight: 0 }}>` around the grid, or pass a fixed pixel `height`. The list view never virtualizes: paginate it. Dev builds log a warning when this happens.
603
603
  12. **Pagination is ignored under row grouping** — a grouped grid is one scrollable, virtualized list.
604
604
  13. **`valueFormatter` + `renderCell`**: `renderCell` receives `params.formattedValue` (v2.1+), so a custom renderer can reuse the formatter instead of duplicating it.
605
605
  14. **`slots.footer`** replaces the pagination area and receives `apiRef`, `aggregationModel`, `aggregationResult`, `rowCount` (filtered data rows excluding pinned rows in flat grids — data rows under tree data / grouping; the server total with `paginationMode="server"`), `pagination`, `paginationModel`, `pageSizeOptions` and `onPaginationModelChange`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencorestack/opengridx",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "OpenGridX: High-performance React data infrastructure. Unlock advanced Row Grouping, Excel Export, and Column Pinning without the usual \"Pro\" gatekeeping. Built for speed, scale, and complete architectural freedom. Fully open, virtualization-ready, and feature-complete.",
5
5
  "type": "module",
6
6
  "main": "./dist/opengridx.umd.js",