@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.
- package/CHANGELOG.md +26 -1
- package/dist/opengridx.es.js +492 -492
- package/dist/opengridx.es.js.map +1 -1
- package/dist/opengridx.umd.js +6 -6
- package/dist/opengridx.umd.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.tsx +26 -19
- package/llms.txt +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencorestack/opengridx",
|
|
3
|
-
"version": "2.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",
|