You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,14 @@
5
5
6
6
---
7
7
8
+
## [1.0.2] — July 30, 2026 📚
9
+
10
+
### Fixed
11
+
-**`GridColDef` documentation**: Added all previously undocumented column properties — `flex`, `minWidth`, `maxWidth`, `align`, `headerAlign`, `description`, `editable`, `renderHeader`, `renderEditCell`, `cellClassName`, `headerClassName`, `disableColumnMenu`, `groupable`, `aggregable`, `availableAggregationFunctions`, `valueOptions` (for `singleSelect`), `colSpan`, `rowSpan`. Both `README.md` and `docs/API_REFERENCE.md` now carry the complete table.
12
+
-**Hooks documentation**: Expanded the stubs in `docs/API_REFERENCE.md` into full reference entries. `usePivot` (was entirely missing), `useGridStateStorage` (was one sentence — now has a full options + return table and code example), `useAggregation` (now has params/return tables and built-in function list), `useGridApiRef` (corrected description and added usage example).
|`headerAlign`|`'left' \| 'center' \| 'right'`|`'left'`| Horizontal alignment of the header cell content. |
107
+
108
+
#### Data & Type
109
+
110
+
| Property | Type | Default | Description |
111
+
| :--- | :--- | :--- | :--- |
112
+
|`type`|`'string' \| 'number' \| 'date' \| 'boolean' \| 'singleSelect' \| 'image'`|`'string'`| Data type — determines default filter operators and cell formatting. |
113
+
|`valueOptions`|`Array<string \| number \| { value: unknown; label: string }>`| — | Allowed values for `type: 'singleSelect'` — used in the filter dropdown and edit cell. |
114
+
|`valueGetter`|`(params: GridValueGetterParams) => unknown`| — | Derive a computed value from the row object. Runs before `valueFormatter` and `renderCell`. |
115
+
|`valueFormatter`|`(params: GridValueFormatterParams) => string`| — | Format the value into a display string (e.g. currency, dates). Does not affect editing or sorting. |
|`renderHeader`|`(params: GridRenderHeaderParams) => ReactNode`| Custom header cell renderer. Use for icons, sort indicators, or rich headers. |
123
+
|`renderEditCell`|`(params: GridRenderCellParams) => ReactNode`| Custom editor rendered when the cell enters edit mode. Requires `editable: true`. |
124
+
125
+
#### Editing
126
+
127
+
| Property | Type | Default | Description |
128
+
| :--- | :--- | :--- | :--- |
129
+
|`editable`|`boolean`|`false`| Enables inline cell editing. Commit is handled by `DataGrid.processRowUpdate`. |
130
+
131
+
#### Spanning
132
+
133
+
| Property | Type | Description |
134
+
| :--- | :--- | :--- |
135
+
|`colSpan`|`number \| ((params: GridRenderCellParams) => number)`| Number of columns this cell merges horizontally. |
136
+
|`rowSpan`|`number \| ((params: GridRenderCellParams) => number)`| Number of rows this cell merges vertically. |
137
+
138
+
#### Styling
139
+
140
+
| Property | Type | Description |
141
+
| :--- | :--- | :--- |
142
+
|`cellClassName`|`string \| ((params: GridRenderCellParams) => string)`| CSS class applied to every cell in this column. Use a function for conditional per-row styling. |
143
+
|`headerClassName`|`string`| CSS class applied to the header cell. |
|`sortable`|`boolean`|`true`| Enable/disable sorting for this column. |
150
+
|`filterable`|`boolean`|`true`| Enable/disable filtering for this column. |
151
+
|`resizable`|`boolean`|`true`| Allow the user to drag-resize this column. |
152
+
|`hideable`|`boolean`|`true`| Allow the user to hide this column via the panel. |
153
+
|`pinnable`|`boolean`|`true`| Allow this column to be pinned via the UI. |
154
+
|`disableColumnMenu`|`boolean`|`false`| Hide the column header kebab/context menu. |
155
+
|`exportable`|`boolean`|`true`| Set to `false` to exclude from CSV, Excel, JSON, and Print exports. |
156
+
|`groupable`|`boolean`|`true`| Allow this column to be used as a row grouping dimension. |
157
+
|`aggregable`|`boolean`|`true`| Allow this column to be aggregated. |
158
+
|`availableAggregationFunctions`|`string[]`| all built-ins | Restrict which aggregation functions are available for this column (e.g. `['sum', 'avg']`). |
109
159
110
160
---
111
161
@@ -136,17 +186,169 @@ Context provider for overriding the grid's visual system.
136
186
## 🛠️ Hooks
137
187
138
188
### `useGridApiRef()`
139
-
Returns a ref to interact with the grid programmatically.
Headless hook for computing column summaries outside of the built-in `aggregationModel` prop. Useful when you need aggregation results for a custom footer or external display.
You can also use `formatAggregationValue(value, fnName)` to produce a display string from a raw result.
246
+
247
+
---
248
+
249
+
### `usePivot(rawRows, rawCols, model, enabled)`
250
+
251
+
Headless hook that transforms a flat dataset into pivot rows and pivot column definitions. Pass the output directly to `<DataGrid rows={} columns={} />` when `pivotMode` is active.
|`enabled`|`boolean`| When `false`, returns empty arrays immediately (no computation). |
281
+
282
+
#### Return (`UsePivotReturn`)
283
+
284
+
| Field | Type | Description |
285
+
| :--- | :--- | :--- |
286
+
|`pivotRows`|`GridRowModel[]`| Transformed rows ready for the grid. |
287
+
|`pivotColumns`|`GridColDef[]`| Generated column definitions for each pivot key. |
288
+
|`colKeys`|`string[]`| The distinct column pivot values used. |
289
+
|`isValid`|`boolean`|`false` if the model is incomplete (e.g. no `rowFields` or `valueFields`). |
290
+
291
+
#### `GridPivotModel`
292
+
293
+
```ts
294
+
interfaceGridPivotModel {
295
+
rowFields:string[]; // fields to group rows by
296
+
columnFields:string[]; // fields to spread as columns
297
+
valueFields:Array<{
298
+
field:string;
299
+
aggFn:'sum'|'avg'|'count'|'min'|'max';
300
+
headerName?:string;
301
+
}>;
302
+
}
303
+
```
304
+
305
+
---
147
306
148
307
### `useGridStateStorage(options)`
149
-
Persist and restore grid configurations to LocalStorage or a backend.
308
+
309
+
Persists grid state (sort, filters, pagination, column visibility, etc.) to `localStorage` and restores it on mount. Pass the returned values directly to `DataGrid`.
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "@opencorestack/opengridx",
3
-
"version": "1.0.1",
3
+
"version": "1.0.2",
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.",
0 commit comments