@opencorestack/opengridx 2.0.0 → 2.0.2

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.
@@ -206,25 +206,32 @@ export function DataGrid<R extends GridRowModel = GridRowModel>(props: DataGridP
206
206
  const isRowGroupingActive = Boolean(propRowGroupingModel && propRowGroupingModel.length > 0);
207
207
 
208
208
  // Auto-pin __group__ column to the left when groupingColDef is active.
209
- const effectivePinnedColumns = (groupingColDef && isRowGroupingActive && !pivotMode)
210
- ? { ...pinnedColumns, left: ['__group__', ...((pinnedColumns?.left ?? []).filter(f => f !== '__group__'))] }
211
- : pinnedColumns;
212
-
213
- const activeColumns = (groupingColDef && isRowGroupingActive && !pivotMode)
214
- ? [
215
- {
216
- headerName: 'Group',
217
- width: 220,
218
- ...groupingColDef,
219
- field: '__group__',
220
- hideable: false,
221
- sortable: false,
222
- pinnable: false,
223
- exportable: false,
224
- } as unknown as GridColDef<R>,
225
- ...baseColumns,
226
- ]
227
- : baseColumns;
209
+ // Both values MUST be memoized: without useMemo they produce a new array/object
210
+ // reference every render, which cascades through useRowGrouping's memos and
211
+ // effects into an infinite setState loop (Maximum update depth exceeded).
212
+ const effectivePinnedColumns = useMemo(() => (
213
+ (groupingColDef && isRowGroupingActive && !pivotMode)
214
+ ? { ...pinnedColumns, left: ['__group__', ...((pinnedColumns?.left ?? []).filter(f => f !== '__group__'))] }
215
+ : pinnedColumns
216
+ ), [groupingColDef, isRowGroupingActive, pivotMode, pinnedColumns]);
217
+
218
+ const activeColumns = useMemo(() => (
219
+ (groupingColDef && isRowGroupingActive && !pivotMode)
220
+ ? [
221
+ {
222
+ headerName: 'Group',
223
+ width: 220,
224
+ ...groupingColDef,
225
+ field: '__group__',
226
+ hideable: false,
227
+ sortable: false,
228
+ pinnable: false,
229
+ exportable: false,
230
+ } as unknown as GridColDef<R>,
231
+ ...baseColumns,
232
+ ]
233
+ : baseColumns
234
+ ), [groupingColDef, isRowGroupingActive, pivotMode, baseColumns]);
228
235
 
229
236
  const [serverAggregationResults, setServerAggregationResults] = useState<GridAggregationResult | null>(null);
230
237
 
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # OpenGridX — AI Agent Context
2
2
  # Package: @opencorestack/opengridx
3
- # Version: 2.0.0
3
+ # Version: 2.0.2
4
4
  # Docs: https://opencorestack.github.io/OpenGridX/
5
5
  # This file is machine-readable. AI developers: start here.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencorestack/opengridx",
3
- "version": "2.0.0",
3
+ "version": "2.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.",
5
5
  "type": "module",
6
6
  "main": "./dist/opengridx.umd.js",