@tanstack/table-core 8.0.0-alpha.82 → 8.0.0-alpha.83
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/build/cjs/core.js.map +1 -1
- package/build/cjs/createTable.js +3 -2
- package/build/cjs/createTable.js.map +1 -1
- package/build/cjs/features/Cells.js +1 -1
- package/build/cjs/features/Cells.js.map +1 -1
- package/build/cjs/features/ColumnSizing.js +5 -5
- package/build/cjs/features/ColumnSizing.js.map +1 -1
- package/build/cjs/features/Columns.js +8 -6
- package/build/cjs/features/Columns.js.map +1 -1
- package/build/cjs/features/Filters.js +9 -5
- package/build/cjs/features/Filters.js.map +1 -1
- package/build/cjs/features/Grouping.js +5 -5
- package/build/cjs/features/Grouping.js.map +1 -1
- package/build/cjs/features/Headers.js +2 -2
- package/build/cjs/features/Headers.js.map +1 -1
- package/build/cjs/features/Pinning.js +14 -8
- package/build/cjs/features/Pinning.js.map +1 -1
- package/build/cjs/features/Sorting.js +8 -8
- package/build/cjs/features/Sorting.js.map +1 -1
- package/build/cjs/features/Visibility.js +3 -3
- package/build/cjs/features/Visibility.js.map +1 -1
- package/build/cjs/utils/getGroupedRowModel.js +2 -2
- package/build/cjs/utils/getGroupedRowModel.js.map +1 -1
- package/build/cjs/utils/getSortedRowModel.js +2 -2
- package/build/cjs/utils/getSortedRowModel.js.map +1 -1
- package/build/esm/index.js +62 -49
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +324 -324
- package/build/types/core.d.ts +4 -4
- package/build/types/createTable.d.ts +4 -4
- package/build/types/features/Columns.d.ts +2 -2
- package/build/types/features/Pinning.d.ts +1 -1
- package/build/types/types.d.ts +5 -3
- package/build/umd/index.development.js +62 -49
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/core.ts +6 -6
- package/src/createTable.ts +7 -4
- package/src/features/Cells.ts +2 -2
- package/src/features/ColumnSizing.ts +5 -5
- package/src/features/Columns.ts +12 -8
- package/src/features/Filters.ts +7 -3
- package/src/features/Grouping.ts +4 -3
- package/src/features/Headers.ts +4 -4
- package/src/features/Pinning.ts +10 -5
- package/src/features/Sorting.ts +9 -9
- package/src/features/Visibility.ts +2 -2
- package/src/types.ts +9 -5
- package/src/utils/getGroupedRowModel.ts +3 -2
- package/src/utils/getSortedRowModel.ts +2 -2
package/build/esm/index.js
CHANGED
|
@@ -89,7 +89,7 @@ function memo(getDeps, fn, opts) {
|
|
|
89
89
|
const Columns = {
|
|
90
90
|
createInstance: instance => {
|
|
91
91
|
return {
|
|
92
|
-
|
|
92
|
+
getDefaultColumnDef: memo(() => [instance.options.defaultColumnDef], defaultColumn => {
|
|
93
93
|
var _defaultColumn;
|
|
94
94
|
|
|
95
95
|
defaultColumn = (_defaultColumn = defaultColumn) != null ? _defaultColumn : {};
|
|
@@ -102,7 +102,7 @@ const Columns = {
|
|
|
102
102
|
return (_props$getValue$toStr = (_props$getValue$toStr2 = (_props$getValue = props.getValue()).toString) == null ? void 0 : _props$getValue$toStr2.call(_props$getValue)) != null ? _props$getValue$toStr : null;
|
|
103
103
|
},
|
|
104
104
|
...instance._features.reduce((obj, feature) => {
|
|
105
|
-
return Object.assign(obj, feature.
|
|
105
|
+
return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());
|
|
106
106
|
}, {}),
|
|
107
107
|
...defaultColumn
|
|
108
108
|
};
|
|
@@ -112,13 +112,16 @@ const Columns = {
|
|
|
112
112
|
|
|
113
113
|
return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugColumns;
|
|
114
114
|
},
|
|
115
|
-
key: process.env.NODE_ENV === 'development' && '
|
|
115
|
+
key: process.env.NODE_ENV === 'development' && 'getDefaultColumnDef'
|
|
116
116
|
}),
|
|
117
117
|
getColumnDefs: () => instance.options.columns,
|
|
118
118
|
createColumn: (columnDef, depth, parent) => {
|
|
119
119
|
var _ref, _columnDef$id;
|
|
120
120
|
|
|
121
|
-
const
|
|
121
|
+
const defaultColumnDef = instance.getDefaultColumnDef();
|
|
122
|
+
columnDef = { ...defaultColumnDef,
|
|
123
|
+
...columnDef
|
|
124
|
+
};
|
|
122
125
|
let id = (_ref = (_columnDef$id = columnDef.id) != null ? _columnDef$id : columnDef.accessorKey) != null ? _ref : typeof columnDef.header === 'string' ? columnDef.header : undefined;
|
|
123
126
|
let accessorFn;
|
|
124
127
|
|
|
@@ -136,8 +139,7 @@ const Columns = {
|
|
|
136
139
|
throw new Error();
|
|
137
140
|
}
|
|
138
141
|
|
|
139
|
-
let column = { ...
|
|
140
|
-
...columnDef,
|
|
142
|
+
let column = { ...columnDef,
|
|
141
143
|
id: "" + id,
|
|
142
144
|
accessorFn,
|
|
143
145
|
parent: parent,
|
|
@@ -373,7 +375,7 @@ const Cells = {
|
|
|
373
375
|
row,
|
|
374
376
|
column,
|
|
375
377
|
getValue: () => row.getValue(columnId),
|
|
376
|
-
renderCell: () => column.cell ? instance._render(column.cell, {
|
|
378
|
+
renderCell: () => column.columnDef.cell ? instance._render(column.columnDef.cell, {
|
|
377
379
|
instance,
|
|
378
380
|
column,
|
|
379
381
|
row,
|
|
@@ -432,7 +434,7 @@ const getDefaultColumnSizingInfoState = () => ({
|
|
|
432
434
|
});
|
|
433
435
|
|
|
434
436
|
const ColumnSizing = {
|
|
435
|
-
|
|
437
|
+
getDefaultColumnDef: () => {
|
|
436
438
|
return defaultColumnSizing;
|
|
437
439
|
},
|
|
438
440
|
getInitialState: state => {
|
|
@@ -452,10 +454,10 @@ const ColumnSizing = {
|
|
|
452
454
|
createColumn: (column, instance) => {
|
|
453
455
|
return {
|
|
454
456
|
getSize: () => {
|
|
455
|
-
var _column$
|
|
457
|
+
var _column$columnDef$min, _ref, _column$columnDef$max;
|
|
456
458
|
|
|
457
459
|
const columnSize = instance.getState().columnSizing[column.id];
|
|
458
|
-
return Math.min(Math.max((_column$
|
|
460
|
+
return Math.min(Math.max((_column$columnDef$min = column.columnDef.minSize) != null ? _column$columnDef$min : defaultColumnSizing.minSize, (_ref = columnSize != null ? columnSize : column.columnDef.size) != null ? _ref : defaultColumnSizing.size), (_column$columnDef$max = column.columnDef.maxSize) != null ? _column$columnDef$max : defaultColumnSizing.maxSize);
|
|
459
461
|
},
|
|
460
462
|
getStart: position => {
|
|
461
463
|
const columns = !position ? instance.getVisibleLeafColumns() : position === 'left' ? instance.getLeftVisibleLeafColumns() : instance.getRightVisibleLeafColumns();
|
|
@@ -478,9 +480,9 @@ const ColumnSizing = {
|
|
|
478
480
|
});
|
|
479
481
|
},
|
|
480
482
|
getCanResize: () => {
|
|
481
|
-
var _column$
|
|
483
|
+
var _column$columnDef$ena, _instance$options$ena;
|
|
482
484
|
|
|
483
|
-
return ((_column$
|
|
485
|
+
return ((_column$columnDef$ena = column.columnDef.enableResizing) != null ? _column$columnDef$ena : true) && ((_instance$options$ena = instance.options.enableColumnResizing) != null ? _instance$options$ena : true);
|
|
484
486
|
},
|
|
485
487
|
getIsResizing: () => {
|
|
486
488
|
return instance.getState().columnSizingInfo.isResizingColumn === column.id;
|
|
@@ -937,7 +939,7 @@ function testFalsey(val) {
|
|
|
937
939
|
|
|
938
940
|
//
|
|
939
941
|
const Filters = {
|
|
940
|
-
|
|
942
|
+
getDefaultColumnDef: () => {
|
|
941
943
|
return {
|
|
942
944
|
filterFn: 'auto'
|
|
943
945
|
};
|
|
@@ -980,6 +982,10 @@ const Filters = {
|
|
|
980
982
|
return filterFns.inNumberRange;
|
|
981
983
|
}
|
|
982
984
|
|
|
985
|
+
if (typeof value === 'boolean') {
|
|
986
|
+
return filterFns.equals;
|
|
987
|
+
}
|
|
988
|
+
|
|
983
989
|
if (value !== null && typeof value === 'object') {
|
|
984
990
|
return filterFns.equals;
|
|
985
991
|
}
|
|
@@ -997,14 +1003,14 @@ const Filters = {
|
|
|
997
1003
|
return isFunction(column.filterFn) ? column.filterFn : column.filterFn === 'auto' ? column.getAutoFilterFn() : (_ref = userFilterFns == null ? void 0 : userFilterFns[column.filterFn]) != null ? _ref : filterFns[column.filterFn];
|
|
998
1004
|
},
|
|
999
1005
|
getCanFilter: () => {
|
|
1000
|
-
var _column$
|
|
1006
|
+
var _column$columnDef$ena, _instance$options$ena, _instance$options$ena2;
|
|
1001
1007
|
|
|
1002
|
-
return ((_column$
|
|
1008
|
+
return ((_column$columnDef$ena = column.columnDef.enableColumnFilter) != null ? _column$columnDef$ena : true) && ((_instance$options$ena = instance.options.enableColumnFilters) != null ? _instance$options$ena : true) && ((_instance$options$ena2 = instance.options.enableFilters) != null ? _instance$options$ena2 : true) && !!column.accessorFn;
|
|
1003
1009
|
},
|
|
1004
1010
|
getCanGlobalFilter: () => {
|
|
1005
|
-
var _column$
|
|
1011
|
+
var _column$columnDef$ena2, _instance$options$ena3, _instance$options$ena4, _instance$options$get;
|
|
1006
1012
|
|
|
1007
|
-
return ((_column$
|
|
1013
|
+
return ((_column$columnDef$ena2 = column.columnDef.enableGlobalFilter) != null ? _column$columnDef$ena2 : true) && ((_instance$options$ena3 = instance.options.enableGlobalFilter) != null ? _instance$options$ena3 : true) && ((_instance$options$ena4 = instance.options.enableFilters) != null ? _instance$options$ena4 : true) && ((_instance$options$get = instance.options.getColumnCanGlobalFilter == null ? void 0 : instance.options.getColumnCanGlobalFilter(column)) != null ? _instance$options$get : true) && !!column.accessorFn;
|
|
1008
1014
|
},
|
|
1009
1015
|
getIsFiltered: () => column.getFilterIndex() > -1,
|
|
1010
1016
|
getFilterValue: () => {
|
|
@@ -1282,7 +1288,7 @@ function count(getLeafValues) {
|
|
|
1282
1288
|
|
|
1283
1289
|
//
|
|
1284
1290
|
const Grouping = {
|
|
1285
|
-
|
|
1291
|
+
getDefaultColumnDef: () => {
|
|
1286
1292
|
return {
|
|
1287
1293
|
aggregationFn: 'auto'
|
|
1288
1294
|
};
|
|
@@ -1312,9 +1318,9 @@ const Grouping = {
|
|
|
1312
1318
|
});
|
|
1313
1319
|
},
|
|
1314
1320
|
getCanGroup: () => {
|
|
1315
|
-
var _ref, _ref2, _ref3, _column$
|
|
1321
|
+
var _ref, _ref2, _ref3, _column$columnDef$ena;
|
|
1316
1322
|
|
|
1317
|
-
return (_ref = (_ref2 = (_ref3 = (_column$
|
|
1323
|
+
return (_ref = (_ref2 = (_ref3 = (_column$columnDef$ena = column.columnDef.enableGrouping) != null ? _column$columnDef$ena : true) != null ? _ref3 : instance.options.enableGrouping) != null ? _ref2 : true) != null ? _ref : !!column.accessorFn;
|
|
1318
1324
|
},
|
|
1319
1325
|
getIsGrouped: () => {
|
|
1320
1326
|
var _instance$getState$gr;
|
|
@@ -1398,9 +1404,9 @@ const Grouping = {
|
|
|
1398
1404
|
return !cell.getIsGrouped() && !cell.getIsPlaceholder() && ((_row$subRows = row.subRows) == null ? void 0 : _row$subRows.length) > 1;
|
|
1399
1405
|
},
|
|
1400
1406
|
renderAggregatedCell: () => {
|
|
1401
|
-
var _column$
|
|
1407
|
+
var _column$columnDef$agg;
|
|
1402
1408
|
|
|
1403
|
-
const template = (_column$
|
|
1409
|
+
const template = (_column$columnDef$agg = column.columnDef.aggregatedCell) != null ? _column$columnDef$agg : column.columnDef.cell;
|
|
1404
1410
|
return template ? instance._render(template, {
|
|
1405
1411
|
instance,
|
|
1406
1412
|
column,
|
|
@@ -1707,9 +1713,9 @@ const Pinning = {
|
|
|
1707
1713
|
getCanPin: () => {
|
|
1708
1714
|
const leafColumns = column.getLeafColumns();
|
|
1709
1715
|
return leafColumns.some(d => {
|
|
1710
|
-
var _d$
|
|
1716
|
+
var _d$columnDef$enablePi, _instance$options$ena;
|
|
1711
1717
|
|
|
1712
|
-
return ((_d$
|
|
1718
|
+
return ((_d$columnDef$enablePi = d.columnDef.enablePinning) != null ? _d$columnDef$enablePi : true) && ((_instance$options$ena = instance.options.enablePinning) != null ? _instance$options$ena : true);
|
|
1713
1719
|
});
|
|
1714
1720
|
},
|
|
1715
1721
|
getIsPinned: () => {
|
|
@@ -1779,12 +1785,18 @@ const Pinning = {
|
|
|
1779
1785
|
|
|
1780
1786
|
return instance.setColumnPinning(defaultState ? getDefaultPinningState() : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.columnPinning) != null ? _instance$initialStat : getDefaultPinningState());
|
|
1781
1787
|
},
|
|
1782
|
-
getIsSomeColumnsPinned:
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
+
getIsSomeColumnsPinned: position => {
|
|
1789
|
+
var _pinningState$positio;
|
|
1790
|
+
|
|
1791
|
+
const pinningState = instance.getState().columnPinning;
|
|
1792
|
+
|
|
1793
|
+
if (!position) {
|
|
1794
|
+
var _pinningState$left, _pinningState$right;
|
|
1795
|
+
|
|
1796
|
+
return Boolean(((_pinningState$left = pinningState.left) == null ? void 0 : _pinningState$left.length) || ((_pinningState$right = pinningState.right) == null ? void 0 : _pinningState$right.length));
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);
|
|
1788
1800
|
},
|
|
1789
1801
|
getLeftLeafColumns: memo(() => [instance.getAllLeafColumns(), instance.getState().columnPinning.left], (allColumns, left) => {
|
|
1790
1802
|
return (left != null ? left : []).map(columnId => allColumns.find(column => column.id === columnId)).filter(Boolean);
|
|
@@ -2310,7 +2322,7 @@ const Sorting = {
|
|
|
2310
2322
|
...state
|
|
2311
2323
|
};
|
|
2312
2324
|
},
|
|
2313
|
-
|
|
2325
|
+
getDefaultColumnDef: () => {
|
|
2314
2326
|
return {
|
|
2315
2327
|
sortingFn: 'auto'
|
|
2316
2328
|
};
|
|
@@ -2370,7 +2382,7 @@ const Sorting = {
|
|
|
2370
2382
|
throw new Error();
|
|
2371
2383
|
}
|
|
2372
2384
|
|
|
2373
|
-
return isFunction(column.sortingFn) ? column.sortingFn : column.sortingFn === 'auto' ? column.getAutoSortingFn() : (_ref = userSortingFn == null ? void 0 : userSortingFn[column.sortingFn]) != null ? _ref : sortingFns[column.sortingFn];
|
|
2385
|
+
return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column.getAutoSortingFn() : (_ref = userSortingFn == null ? void 0 : userSortingFn[column.columnDef.sortingFn]) != null ? _ref : sortingFns[column.columnDef.sortingFn];
|
|
2374
2386
|
},
|
|
2375
2387
|
toggleSorting: (desc, multi) => {
|
|
2376
2388
|
// if (column.columns.length) {
|
|
@@ -2382,7 +2394,7 @@ const Sorting = {
|
|
|
2382
2394
|
// return
|
|
2383
2395
|
// }
|
|
2384
2396
|
instance.setSorting(old => {
|
|
2385
|
-
var _ref2, _column$
|
|
2397
|
+
var _ref2, _column$columnDef$sor, _instance$options$ena, _instance$options$ena2;
|
|
2386
2398
|
|
|
2387
2399
|
// Find any existing sorting for this column
|
|
2388
2400
|
const existingSorting = old == null ? void 0 : old.find(d => d.id === column.id);
|
|
@@ -2409,7 +2421,7 @@ const Sorting = {
|
|
|
2409
2421
|
}
|
|
2410
2422
|
}
|
|
2411
2423
|
|
|
2412
|
-
const sortDescFirst = (_ref2 = (_column$
|
|
2424
|
+
const sortDescFirst = (_ref2 = (_column$columnDef$sor = column.columnDef.sortDescFirst) != null ? _column$columnDef$sor : instance.options.sortDescFirst) != null ? _ref2 : column.getAutoSortDir() === 'desc'; // Handle toggle states that will remove the sorting
|
|
2413
2425
|
|
|
2414
2426
|
if (sortAction === 'toggle' && ( // Must be toggling
|
|
2415
2427
|
(_instance$options$ena = instance.options.enableSortingRemoval) != null ? _instance$options$ena : true) && // If enableSortRemove, enable in general
|
|
@@ -2453,14 +2465,14 @@ const Sorting = {
|
|
|
2453
2465
|
});
|
|
2454
2466
|
},
|
|
2455
2467
|
getCanSort: () => {
|
|
2456
|
-
var _column$
|
|
2468
|
+
var _column$columnDef$ena, _instance$options$ena3;
|
|
2457
2469
|
|
|
2458
|
-
return ((_column$
|
|
2470
|
+
return ((_column$columnDef$ena = column.columnDef.enableSorting) != null ? _column$columnDef$ena : true) && ((_instance$options$ena3 = instance.options.enableSorting) != null ? _instance$options$ena3 : true) && !!column.accessorFn;
|
|
2459
2471
|
},
|
|
2460
2472
|
getCanMultiSort: () => {
|
|
2461
|
-
var _ref3, _column$
|
|
2473
|
+
var _ref3, _column$columnDef$ena2;
|
|
2462
2474
|
|
|
2463
|
-
return (_ref3 = (_column$
|
|
2475
|
+
return (_ref3 = (_column$columnDef$ena2 = column.columnDef.enableMultiSort) != null ? _column$columnDef$ena2 : instance.options.enableMultiSort) != null ? _ref3 : !!column.accessorFn;
|
|
2464
2476
|
},
|
|
2465
2477
|
getIsSorted: () => {
|
|
2466
2478
|
var _instance$getState$so;
|
|
@@ -2524,7 +2536,7 @@ const Visibility = {
|
|
|
2524
2536
|
onColumnVisibilityChange: makeStateUpdater('columnVisibility', instance)
|
|
2525
2537
|
};
|
|
2526
2538
|
},
|
|
2527
|
-
|
|
2539
|
+
getDefaultColumnDef: () => {
|
|
2528
2540
|
return {
|
|
2529
2541
|
defaultIsVisible: true
|
|
2530
2542
|
};
|
|
@@ -2544,9 +2556,9 @@ const Visibility = {
|
|
|
2544
2556
|
return (_instance$getState$co = (_instance$getState$co2 = instance.getState().columnVisibility) == null ? void 0 : _instance$getState$co2[column.id]) != null ? _instance$getState$co : true;
|
|
2545
2557
|
},
|
|
2546
2558
|
getCanHide: () => {
|
|
2547
|
-
var _column$
|
|
2559
|
+
var _column$columnDef$ena, _instance$options$ena;
|
|
2548
2560
|
|
|
2549
|
-
return ((_column$
|
|
2561
|
+
return ((_column$columnDef$ena = column.columnDef.enableHiding) != null ? _column$columnDef$ena : true) && ((_instance$options$ena = instance.options.enableHiding) != null ? _instance$options$ena : true);
|
|
2550
2562
|
},
|
|
2551
2563
|
getToggleVisibilityHandler: () => {
|
|
2552
2564
|
return e => {
|
|
@@ -2657,12 +2669,12 @@ const Headers = {
|
|
|
2657
2669
|
recurseHeader(header);
|
|
2658
2670
|
return leafHeaders;
|
|
2659
2671
|
},
|
|
2660
|
-
renderHeader: () => column.header ? instance._render(column.header, {
|
|
2672
|
+
renderHeader: () => column.columnDef.header ? instance._render(column.columnDef.header, {
|
|
2661
2673
|
instance,
|
|
2662
2674
|
header: header,
|
|
2663
2675
|
column
|
|
2664
2676
|
}) : null,
|
|
2665
|
-
renderFooter: () => column.footer ? instance._render(column.footer, {
|
|
2677
|
+
renderFooter: () => column.columnDef.footer ? instance._render(column.columnDef.footer, {
|
|
2666
2678
|
instance,
|
|
2667
2679
|
header: header,
|
|
2668
2680
|
column
|
|
@@ -3170,7 +3182,7 @@ function createTable(_, __, options) {
|
|
|
3170
3182
|
throw new Error('');
|
|
3171
3183
|
})()
|
|
3172
3184
|
},
|
|
3173
|
-
setGenerics: () => table,
|
|
3185
|
+
// setGenerics: () => table as any,
|
|
3174
3186
|
setRowType: () => table,
|
|
3175
3187
|
setTableMetaType: () => table,
|
|
3176
3188
|
setColumnMetaType: () => table,
|
|
@@ -3206,7 +3218,8 @@ function createTable(_, __, options) {
|
|
|
3206
3218
|
}
|
|
3207
3219
|
|
|
3208
3220
|
throw new Error('Invalid accessor');
|
|
3209
|
-
}
|
|
3221
|
+
},
|
|
3222
|
+
createOptions: options => options
|
|
3210
3223
|
};
|
|
3211
3224
|
return table;
|
|
3212
3225
|
}
|
|
@@ -3603,8 +3616,8 @@ function getSortedRowModel() {
|
|
|
3603
3616
|
availableSorting.forEach(sortEntry => {
|
|
3604
3617
|
const column = instance.getColumn(sortEntry.id);
|
|
3605
3618
|
columnInfoById[sortEntry.id] = {
|
|
3606
|
-
sortUndefined: column.sortUndefined,
|
|
3607
|
-
invertSorting: column.invertSorting,
|
|
3619
|
+
sortUndefined: column.columnDef.sortUndefined,
|
|
3620
|
+
invertSorting: column.columnDef.invertSorting,
|
|
3608
3621
|
sortingFn: column.getSortingFn()
|
|
3609
3622
|
};
|
|
3610
3623
|
});
|
|
@@ -3752,8 +3765,8 @@ function getGroupedRowModel() {
|
|
|
3752
3765
|
row.groupingValuesCache[columnId] = aggregateFn(() => leafRows.map(row => {
|
|
3753
3766
|
let columnValue = row.getValue(columnId);
|
|
3754
3767
|
|
|
3755
|
-
if (!depth && column.aggregateValue) {
|
|
3756
|
-
columnValue = column.aggregateValue(columnValue);
|
|
3768
|
+
if (!depth && column.columnDef.aggregateValue) {
|
|
3769
|
+
columnValue = column.columnDef.aggregateValue(columnValue);
|
|
3757
3770
|
}
|
|
3758
3771
|
|
|
3759
3772
|
return columnValue;
|