@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/CHANGELOG.md +36 -0
- package/README.md +7 -5
- package/dist/index.d.ts +18 -8
- package/dist/opengridx.css +1 -1
- package/dist/opengridx.es.js +1371 -1365
- package/dist/opengridx.es.js.map +1 -1
- package/dist/opengridx.umd.js +10 -10
- package/dist/opengridx.umd.js.map +1 -1
- package/docs/API_REFERENCE.md +11 -7
- package/docs/components/column-resize.md +1 -1
- package/docs/components/datagrid.md +1 -1
- package/docs/customization/theming.md +1 -1
- package/docs/features/list-view.md +1 -1
- package/docs/features/pdf-export.md +16 -0
- package/docs/features/pinning.md +1 -0
- package/docs/features/virtualization.md +11 -9
- package/docs/migration/v2-to-v3.md +12 -1
- package/docs/roadmap.md +1 -1
- package/lib/components/Cell/Cell.css +4 -0
- package/lib/components/ColumnResizeHandle/ColumnResizeHandle.css +5 -3
- package/lib/components/DataGrid/DataGrid.css +8 -0
- package/lib/components/DataGrid/DataGrid.tsx +6 -2
- package/lib/components/DataGrid/GridListView.tsx +2 -1
- package/lib/components/Header/Header.css +3 -0
- package/lib/components/Header/Header.tsx +3 -1
- package/lib/hooks/core/gridApiPlaceholder.ts +2 -2
- package/lib/hooks/core/useGridApiRef.ts +7 -4
- package/lib/hooks/core/useGridDevWarnings.ts +23 -5
- package/lib/types/index.ts +14 -7
- package/llms.txt +6 -6
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenGridX — AI Agent Context
|
|
2
2
|
# Package: @opencorestack/opengridx
|
|
3
|
-
# Version: 3.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.
|
|
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.
|
|
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.
|
|
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",
|