@tanstack/table-core 8.0.0-beta.2 → 8.0.0-beta.5
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/cell.js +7 -1
- package/build/cjs/core/cell.js.map +1 -1
- package/build/cjs/core/instance.js +2 -2
- package/build/cjs/core/instance.js.map +1 -1
- package/build/cjs/features/Filters.js +1 -2
- package/build/cjs/features/Filters.js.map +1 -1
- package/build/cjs/features/Grouping.js +19 -6
- package/build/cjs/features/Grouping.js.map +1 -1
- package/build/cjs/features/RowSelection.js +3 -3
- package/build/cjs/features/RowSelection.js.map +1 -1
- package/build/cjs/features/Sorting.js +27 -9
- package/build/cjs/features/Sorting.js.map +1 -1
- package/build/cjs/utils/getGroupedRowModel.js +0 -5
- package/build/cjs/utils/getGroupedRowModel.js.map +1 -1
- package/build/cjs/utils/getPaginationRowModel.js +19 -5
- package/build/cjs/utils/getPaginationRowModel.js.map +1 -1
- package/build/esm/index.js +78 -33
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +322 -322
- package/build/types/core/instance.d.ts +1 -0
- package/build/types/features/Filters.d.ts +0 -3
- package/build/types/features/Grouping.d.ts +0 -3
- package/build/types/features/RowSelection.d.ts +2 -2
- package/build/types/features/Sorting.d.ts +1 -0
- package/build/types/types.d.ts +1 -1
- package/build/umd/index.development.js +78 -33
- 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/cell.ts +4 -1
- package/src/core/instance.ts +2 -1
- package/src/features/Filters.ts +5 -7
- package/src/features/Grouping.ts +19 -10
- package/src/features/RowSelection.ts +7 -5
- package/src/features/Sorting.ts +27 -12
- package/src/types.ts +1 -1
- package/src/utils/getGroupedRowModel.ts +0 -7
- package/src/utils/getPaginationRowModel.ts +21 -6
|
@@ -30,6 +30,7 @@ export declare type CoreOptions<TGenerics extends TableGenerics> = {
|
|
|
30
30
|
getRowId?: (originalRow: TGenerics['Row'], index: number, parent?: Row<TGenerics>) => string;
|
|
31
31
|
columns: ColumnDef<TGenerics>[];
|
|
32
32
|
defaultColumn?: Partial<ColumnDef<TGenerics>>;
|
|
33
|
+
renderFallbackValue: any;
|
|
33
34
|
};
|
|
34
35
|
export declare type CoreInstance<TGenerics extends TableGenerics> = {
|
|
35
36
|
initialState: TableState;
|
|
@@ -34,9 +34,6 @@ export declare type FiltersColumnDef<TGenerics extends TableGenerics> = {
|
|
|
34
34
|
enableGlobalFilter?: boolean;
|
|
35
35
|
};
|
|
36
36
|
export declare type FiltersColumn<TGenerics extends TableGenerics> = {
|
|
37
|
-
filterFn: FilterFnOption<Overwrite<TGenerics, {
|
|
38
|
-
Value: any;
|
|
39
|
-
}>>;
|
|
40
37
|
getAutoFilterFn: () => FilterFn<TGenerics> | undefined;
|
|
41
38
|
getFilterFn: () => FilterFn<TGenerics> | undefined;
|
|
42
39
|
setFilterValue: (updater: Updater<any>) => void;
|
|
@@ -24,9 +24,6 @@ export declare type GroupingColumnDef<TGenerics extends TableGenerics> = {
|
|
|
24
24
|
enableGrouping?: boolean;
|
|
25
25
|
};
|
|
26
26
|
export declare type GroupingColumn<TGenerics extends TableGenerics> = {
|
|
27
|
-
aggregationFn?: AggregationFnOption<Overwrite<TGenerics, {
|
|
28
|
-
Value: any;
|
|
29
|
-
}>>;
|
|
30
27
|
getCanGroup: () => boolean;
|
|
31
28
|
getIsGrouped: () => boolean;
|
|
32
29
|
getGroupedIndex: () => number;
|
|
@@ -28,8 +28,8 @@ export declare type RowSelectionInstance<TGenerics extends TableGenerics> = {
|
|
|
28
28
|
getIsAllPageRowsSelected: () => boolean;
|
|
29
29
|
getIsSomeRowsSelected: () => boolean;
|
|
30
30
|
getIsSomePageRowsSelected: () => boolean;
|
|
31
|
-
toggleAllRowsSelected: (value
|
|
32
|
-
toggleAllPageRowsSelected: (value
|
|
31
|
+
toggleAllRowsSelected: (value?: boolean) => void;
|
|
32
|
+
toggleAllPageRowsSelected: (value?: boolean) => void;
|
|
33
33
|
getPreSelectedRowModel: () => RowModel<TGenerics>;
|
|
34
34
|
getSelectedRowModel: () => RowModel<TGenerics>;
|
|
35
35
|
getFilteredSelectedRowModel: () => RowModel<TGenerics>;
|
|
@@ -31,6 +31,7 @@ export declare type SortingColumn<TGenerics extends TableGenerics> = {
|
|
|
31
31
|
getAutoSortingFn: () => SortingFn<TGenerics>;
|
|
32
32
|
getAutoSortDir: () => SortDirection;
|
|
33
33
|
getSortingFn: () => SortingFn<TGenerics>;
|
|
34
|
+
getNextSortingOrder: () => SortDirection | false;
|
|
34
35
|
getCanSort: () => boolean;
|
|
35
36
|
getCanMultiSort: () => boolean;
|
|
36
37
|
getSortIndex: () => number;
|
package/build/types/types.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare type TableGenerics = {
|
|
|
31
31
|
export declare type AnyRender = (Comp: any, props: any) => any;
|
|
32
32
|
export declare type TableInstance<TGenerics extends TableGenerics> = CoreInstance<TGenerics> & HeadersInstance<TGenerics> & VisibilityInstance<TGenerics> & ColumnOrderInstance<TGenerics> & ColumnPinningInstance<TGenerics> & FiltersInstance<TGenerics> & SortingInstance<TGenerics> & GroupingInstance<TGenerics> & ColumnSizingInstance<TGenerics> & ExpandedInstance<TGenerics> & PaginationInstance<TGenerics> & RowSelectionInstance<TGenerics>;
|
|
33
33
|
export declare type TableOptionsResolved<TGenerics extends TableGenerics> = CoreOptions<TGenerics> & VisibilityOptions & ColumnOrderOptions & ColumnPinningOptions & FiltersOptions<TGenerics> & SortingOptions<TGenerics> & GroupingOptions<TGenerics> & ExpandedOptions<TGenerics> & ColumnSizingOptions & PaginationOptions<TGenerics> & RowSelectionOptions<TGenerics>;
|
|
34
|
-
export declare type TableOptions<TGenerics extends TableGenerics> = Omit<PartialKeys<TableOptionsResolved<TGenerics>, 'state' | 'onStateChange'>, 'render'>;
|
|
34
|
+
export declare type TableOptions<TGenerics extends TableGenerics> = Omit<PartialKeys<TableOptionsResolved<TGenerics>, 'state' | 'onStateChange'>, 'render' | 'renderFallbackValue'>;
|
|
35
35
|
export declare type TableState = CoreTableState & VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationTableState & RowSelectionTableState;
|
|
36
36
|
export declare type InitialTableState = Partial<CoreTableState & VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState & PaginationInitialTableState & RowSelectionTableState>;
|
|
37
37
|
export declare type Row<TGenerics extends TableGenerics> = CoreRow<TGenerics> & VisibilityRow<TGenerics> & ColumnPinningRow<TGenerics> & FiltersRow<TGenerics> & GroupingRow & RowSelectionRow & ExpandedRow;
|
|
@@ -1098,7 +1098,6 @@
|
|
|
1098
1098
|
},
|
|
1099
1099
|
createColumn: (column, instance) => {
|
|
1100
1100
|
return {
|
|
1101
|
-
filterFn: column.filterFn,
|
|
1102
1101
|
getAutoFilterFn: () => {
|
|
1103
1102
|
const firstRow = instance.getCoreRowModel().flatRows[0];
|
|
1104
1103
|
const value = firstRow == null ? void 0 : firstRow.getValue(column.id);
|
|
@@ -1129,7 +1128,7 @@
|
|
|
1129
1128
|
var _ref;
|
|
1130
1129
|
|
|
1131
1130
|
const userFilterFns = instance.options.filterFns;
|
|
1132
|
-
return isFunction(column.filterFn) ? column.filterFn : column.filterFn === 'auto' ? column.getAutoFilterFn() : (_ref = userFilterFns == null ? void 0 : userFilterFns[column.filterFn]) != null ? _ref : filterFns[column.filterFn];
|
|
1131
|
+
return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column.getAutoFilterFn() : (_ref = userFilterFns == null ? void 0 : userFilterFns[column.columnDef.filterFn]) != null ? _ref : filterFns[column.columnDef.filterFn];
|
|
1133
1132
|
},
|
|
1134
1133
|
getCanFilter: () => {
|
|
1135
1134
|
var _column$columnDef$ena, _instance$options$ena, _instance$options$ena2;
|
|
@@ -1418,6 +1417,11 @@
|
|
|
1418
1417
|
const Grouping = {
|
|
1419
1418
|
getDefaultColumnDef: () => {
|
|
1420
1419
|
return {
|
|
1420
|
+
aggregatedCell: props => {
|
|
1421
|
+
var _props$getValue$toStr, _props$getValue;
|
|
1422
|
+
|
|
1423
|
+
return (_props$getValue$toStr = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _props$getValue$toStr : null;
|
|
1424
|
+
},
|
|
1421
1425
|
aggregationFn: 'auto'
|
|
1422
1426
|
};
|
|
1423
1427
|
},
|
|
@@ -1478,8 +1482,6 @@
|
|
|
1478
1482
|
if (Object.prototype.toString.call(value) === '[object Date]') {
|
|
1479
1483
|
return aggregationFns.extent;
|
|
1480
1484
|
}
|
|
1481
|
-
|
|
1482
|
-
return aggregationFns.count;
|
|
1483
1485
|
},
|
|
1484
1486
|
getAggregationFn: () => {
|
|
1485
1487
|
var _ref4;
|
|
@@ -1490,7 +1492,7 @@
|
|
|
1490
1492
|
throw new Error();
|
|
1491
1493
|
}
|
|
1492
1494
|
|
|
1493
|
-
return isFunction(column.aggregationFn) ? column.aggregationFn : column.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_ref4 = userAggregationFns == null ? void 0 : userAggregationFns[column.aggregationFn]) != null ? _ref4 : aggregationFns[column.aggregationFn];
|
|
1495
|
+
return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column.getAutoAggregationFn() : (_ref4 = userAggregationFns == null ? void 0 : userAggregationFns[column.columnDef.aggregationFn]) != null ? _ref4 : aggregationFns[column.columnDef.aggregationFn];
|
|
1494
1496
|
}
|
|
1495
1497
|
};
|
|
1496
1498
|
},
|
|
@@ -1523,6 +1525,12 @@
|
|
|
1523
1525
|
};
|
|
1524
1526
|
},
|
|
1525
1527
|
createCell: (cell, column, row, instance) => {
|
|
1528
|
+
const getRenderValue = () => {
|
|
1529
|
+
var _cell$getValue;
|
|
1530
|
+
|
|
1531
|
+
return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : instance.options.renderFallbackValue;
|
|
1532
|
+
};
|
|
1533
|
+
|
|
1526
1534
|
return {
|
|
1527
1535
|
getIsGrouped: () => column.getIsGrouped() && column.id === row.groupingColumnId,
|
|
1528
1536
|
getIsPlaceholder: () => !cell.getIsGrouped() && column.getIsGrouped(),
|
|
@@ -1532,15 +1540,19 @@
|
|
|
1532
1540
|
return !cell.getIsGrouped() && !cell.getIsPlaceholder() && ((_row$subRows = row.subRows) == null ? void 0 : _row$subRows.length) > 1;
|
|
1533
1541
|
},
|
|
1534
1542
|
renderAggregatedCell: () => {
|
|
1535
|
-
|
|
1543
|
+
{
|
|
1544
|
+
if (!column.columnDef.aggregatedCell) {
|
|
1545
|
+
console.warn('A columnDef.aggregatedCell template is recommended for displaying aggregated values.');
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1536
1548
|
|
|
1537
|
-
const template =
|
|
1549
|
+
const template = column.columnDef.aggregatedCell || column.columnDef.cell;
|
|
1538
1550
|
return template ? instance._render(template, {
|
|
1539
1551
|
instance,
|
|
1540
1552
|
column,
|
|
1541
1553
|
row,
|
|
1542
1554
|
cell,
|
|
1543
|
-
getValue:
|
|
1555
|
+
getValue: getRenderValue
|
|
1544
1556
|
}) : null;
|
|
1545
1557
|
}
|
|
1546
1558
|
};
|
|
@@ -2010,11 +2022,11 @@
|
|
|
2010
2022
|
});
|
|
2011
2023
|
},
|
|
2012
2024
|
toggleAllPageRowsSelected: value => instance.setRowSelection(old => {
|
|
2013
|
-
typeof value !== 'undefined' ? value : !instance.getIsAllPageRowsSelected();
|
|
2025
|
+
const resolvedValue = typeof value !== 'undefined' ? value : !instance.getIsAllPageRowsSelected();
|
|
2014
2026
|
const rowSelection = { ...old
|
|
2015
2027
|
};
|
|
2016
2028
|
instance.getRowModel().rows.forEach(row => {
|
|
2017
|
-
mutateRowIsSelected(rowSelection, row.id,
|
|
2029
|
+
mutateRowIsSelected(rowSelection, row.id, resolvedValue, instance);
|
|
2018
2030
|
});
|
|
2019
2031
|
return rowSelection;
|
|
2020
2032
|
}),
|
|
@@ -2169,7 +2181,7 @@
|
|
|
2169
2181
|
},
|
|
2170
2182
|
getIsSomePageRowsSelected: () => {
|
|
2171
2183
|
const paginationFlatRows = instance.getPaginationRowModel().flatRows;
|
|
2172
|
-
return instance.getIsAllPageRowsSelected() ? false :
|
|
2184
|
+
return instance.getIsAllPageRowsSelected() ? false : paginationFlatRows.some(d => d.getIsSelected() || d.getIsSomeSelected());
|
|
2173
2185
|
},
|
|
2174
2186
|
getToggleAllRowsSelectedHandler: () => {
|
|
2175
2187
|
return e => {
|
|
@@ -2523,8 +2535,10 @@
|
|
|
2523
2535
|
// })
|
|
2524
2536
|
// return
|
|
2525
2537
|
// }
|
|
2538
|
+
// this needs to be outside of instance.setSorting to be in sync with rerender
|
|
2539
|
+
const nextSortingOrder = column.getNextSortingOrder();
|
|
2526
2540
|
instance.setSorting(old => {
|
|
2527
|
-
var
|
|
2541
|
+
var _instance$options$ena, _instance$options$ena2;
|
|
2528
2542
|
|
|
2529
2543
|
// Find any existing sorting for this column
|
|
2530
2544
|
const existingSorting = old == null ? void 0 : old.find(d => d.id === column.id);
|
|
@@ -2549,30 +2563,29 @@
|
|
|
2549
2563
|
} else {
|
|
2550
2564
|
sortAction = 'replace';
|
|
2551
2565
|
}
|
|
2552
|
-
}
|
|
2566
|
+
} // Handle toggle states that will remove the sorting
|
|
2553
2567
|
|
|
2554
|
-
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
|
|
2555
2568
|
|
|
2556
2569
|
if (sortAction === 'toggle' && ( // Must be toggling
|
|
2557
2570
|
(_instance$options$ena = instance.options.enableSortingRemoval) != null ? _instance$options$ena : true) && // If enableSortRemove, enable in general
|
|
2558
2571
|
!hasDescDefined && ( // Must not be setting desc
|
|
2559
|
-
multi ? (_instance$options$ena2 = instance.options.enableMultiRemove) != null ? _instance$options$ena2 : true : true) &&
|
|
2560
|
-
|
|
2561
|
-
|
|
2572
|
+
multi ? (_instance$options$ena2 = instance.options.enableMultiRemove) != null ? _instance$options$ena2 : true : true) && // If multi, don't allow if enableMultiRemove
|
|
2573
|
+
!nextSortingOrder // Finally, detect if it should indeed be removed
|
|
2574
|
+
) {
|
|
2562
2575
|
sortAction = 'remove';
|
|
2563
2576
|
}
|
|
2564
2577
|
|
|
2565
2578
|
if (sortAction === 'replace') {
|
|
2566
2579
|
newSorting = [{
|
|
2567
2580
|
id: column.id,
|
|
2568
|
-
desc: hasDescDefined ? desc :
|
|
2581
|
+
desc: hasDescDefined ? desc : nextSortingOrder === 'desc'
|
|
2569
2582
|
}];
|
|
2570
2583
|
} else if (sortAction === 'add' && old != null && old.length) {
|
|
2571
2584
|
var _instance$options$max;
|
|
2572
2585
|
|
|
2573
2586
|
newSorting = [...old, {
|
|
2574
2587
|
id: column.id,
|
|
2575
|
-
desc: hasDescDefined ? desc :
|
|
2588
|
+
desc: hasDescDefined ? desc : nextSortingOrder === 'desc'
|
|
2576
2589
|
}]; // Take latest n columns
|
|
2577
2590
|
|
|
2578
2591
|
newSorting.splice(0, newSorting.length - ((_instance$options$max = instance.options.maxMultiSortColCount) != null ? _instance$options$max : Number.MAX_SAFE_INTEGER));
|
|
@@ -2581,7 +2594,7 @@
|
|
|
2581
2594
|
newSorting = old.map(d => {
|
|
2582
2595
|
if (d.id === column.id) {
|
|
2583
2596
|
return { ...d,
|
|
2584
|
-
desc: hasDescDefined ? desc :
|
|
2597
|
+
desc: hasDescDefined ? desc : nextSortingOrder === 'desc'
|
|
2585
2598
|
};
|
|
2586
2599
|
}
|
|
2587
2600
|
|
|
@@ -2594,6 +2607,23 @@
|
|
|
2594
2607
|
return newSorting;
|
|
2595
2608
|
});
|
|
2596
2609
|
},
|
|
2610
|
+
getNextSortingOrder: () => {
|
|
2611
|
+
var _ref2, _column$columnDef$sor;
|
|
2612
|
+
|
|
2613
|
+
const sortDescFirst = (_ref2 = (_column$columnDef$sor = column.columnDef.sortDescFirst) != null ? _column$columnDef$sor : instance.options.sortDescFirst) != null ? _ref2 : column.getAutoSortDir() === 'desc';
|
|
2614
|
+
const firstSortDirection = sortDescFirst ? 'desc' : 'asc';
|
|
2615
|
+
const isSorted = column.getIsSorted();
|
|
2616
|
+
|
|
2617
|
+
if (!isSorted) {
|
|
2618
|
+
return firstSortDirection;
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
if (isSorted === firstSortDirection) {
|
|
2622
|
+
return isSorted === 'desc' ? 'asc' : 'desc';
|
|
2623
|
+
} else {
|
|
2624
|
+
return false;
|
|
2625
|
+
}
|
|
2626
|
+
},
|
|
2597
2627
|
getCanSort: () => {
|
|
2598
2628
|
var _column$columnDef$ena, _instance$options$ena3;
|
|
2599
2629
|
|
|
@@ -2885,9 +2915,9 @@
|
|
|
2885
2915
|
header: props => props.header.column.id,
|
|
2886
2916
|
footer: props => props.header.column.id,
|
|
2887
2917
|
cell: props => {
|
|
2888
|
-
var _props$getValue$toStr, _props$getValue
|
|
2918
|
+
var _props$getValue$toStr, _props$getValue;
|
|
2889
2919
|
|
|
2890
|
-
return (_props$getValue$toStr = (_props$getValue
|
|
2920
|
+
return (_props$getValue$toStr = (_props$getValue = props.getValue()) == null ? void 0 : _props$getValue.toString == null ? void 0 : _props$getValue.toString()) != null ? _props$getValue$toStr : null;
|
|
2891
2921
|
},
|
|
2892
2922
|
...instance._features.reduce((obj, feature) => {
|
|
2893
2923
|
return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());
|
|
@@ -3041,6 +3071,12 @@
|
|
|
3041
3071
|
}
|
|
3042
3072
|
|
|
3043
3073
|
function createCell(instance, row, column, columnId) {
|
|
3074
|
+
const getRenderValue = () => {
|
|
3075
|
+
var _cell$getValue;
|
|
3076
|
+
|
|
3077
|
+
return (_cell$getValue = cell.getValue()) != null ? _cell$getValue : instance.options.renderFallbackValue;
|
|
3078
|
+
};
|
|
3079
|
+
|
|
3044
3080
|
const cell = {
|
|
3045
3081
|
id: row.id + "_" + column.id,
|
|
3046
3082
|
row,
|
|
@@ -3052,7 +3088,7 @@
|
|
|
3052
3088
|
column,
|
|
3053
3089
|
row,
|
|
3054
3090
|
cell: cell,
|
|
3055
|
-
getValue:
|
|
3091
|
+
getValue: getRenderValue
|
|
3056
3092
|
}) : null;
|
|
3057
3093
|
}
|
|
3058
3094
|
};
|
|
@@ -3658,11 +3694,6 @@
|
|
|
3658
3694
|
if (aggregateFn) {
|
|
3659
3695
|
row._groupingValuesCache[columnId] = aggregateFn(columnId, leafRows, groupedRows);
|
|
3660
3696
|
return row._groupingValuesCache[columnId];
|
|
3661
|
-
} else if (column.aggregationFn) {
|
|
3662
|
-
console.info({
|
|
3663
|
-
column
|
|
3664
|
-
});
|
|
3665
|
-
throw new Error("Table: Invalid column.aggregateType option for column listed above" );
|
|
3666
3697
|
}
|
|
3667
3698
|
}
|
|
3668
3699
|
});
|
|
@@ -3786,20 +3817,34 @@
|
|
|
3786
3817
|
const pageStart = pageSize * pageIndex;
|
|
3787
3818
|
const pageEnd = pageStart + pageSize;
|
|
3788
3819
|
rows = rows.slice(pageStart, pageEnd);
|
|
3820
|
+
let paginatedRowModel;
|
|
3789
3821
|
|
|
3790
3822
|
if (!instance.options.paginateExpandedRows) {
|
|
3791
|
-
|
|
3823
|
+
paginatedRowModel = expandRows({
|
|
3792
3824
|
rows,
|
|
3793
3825
|
flatRows,
|
|
3794
3826
|
rowsById
|
|
3795
3827
|
});
|
|
3828
|
+
} else {
|
|
3829
|
+
paginatedRowModel = {
|
|
3830
|
+
rows,
|
|
3831
|
+
flatRows,
|
|
3832
|
+
rowsById
|
|
3833
|
+
};
|
|
3796
3834
|
}
|
|
3797
3835
|
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3836
|
+
paginatedRowModel.flatRows = [];
|
|
3837
|
+
|
|
3838
|
+
const handleRow = row => {
|
|
3839
|
+
paginatedRowModel.flatRows.push(row);
|
|
3840
|
+
|
|
3841
|
+
if (row.subRows.length) {
|
|
3842
|
+
row.subRows.forEach(handleRow);
|
|
3843
|
+
}
|
|
3802
3844
|
};
|
|
3845
|
+
|
|
3846
|
+
paginatedRowModel.rows.forEach(handleRow);
|
|
3847
|
+
return paginatedRowModel;
|
|
3803
3848
|
}, {
|
|
3804
3849
|
key: 'getPaginationRowModel',
|
|
3805
3850
|
debug: () => {
|