@tanstack/react-table 8.0.4 → 8.0.6
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/react-table/src/index.js.map +1 -1
- package/build/cjs/table-core/build/esm/index.js +12 -3
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +12 -3
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/umd/index.development.js +12 -3
- 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 +2 -2
package/build/esm/index.js
CHANGED
|
@@ -2309,6 +2309,9 @@ function selectRowsFn(instance, rowModel) {
|
|
|
2309
2309
|
const newSelectedRowsById = {}; // Filters top level and nested rows
|
|
2310
2310
|
|
|
2311
2311
|
const recurseRows = function (rows, depth) {
|
|
2312
|
+
if (depth === void 0) {
|
|
2313
|
+
depth = 0;
|
|
2314
|
+
}
|
|
2312
2315
|
|
|
2313
2316
|
return rows.map(row => {
|
|
2314
2317
|
var _row$subRows2;
|
|
@@ -2322,7 +2325,7 @@ function selectRowsFn(instance, rowModel) {
|
|
|
2322
2325
|
|
|
2323
2326
|
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
|
|
2324
2327
|
row = { ...row,
|
|
2325
|
-
subRows: recurseRows(row.subRows)
|
|
2328
|
+
subRows: recurseRows(row.subRows, depth + 1)
|
|
2326
2329
|
};
|
|
2327
2330
|
}
|
|
2328
2331
|
|
|
@@ -3247,6 +3250,9 @@ function filterRowModelFromLeafs(rowsToFilter, filterRow, instance) {
|
|
|
3247
3250
|
const newFilteredRowsById = {};
|
|
3248
3251
|
|
|
3249
3252
|
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3253
|
+
if (depth === void 0) {
|
|
3254
|
+
depth = 0;
|
|
3255
|
+
}
|
|
3250
3256
|
|
|
3251
3257
|
const rows = []; // Filter from children up first
|
|
3252
3258
|
|
|
@@ -3258,7 +3264,7 @@ function filterRowModelFromLeafs(rowsToFilter, filterRow, instance) {
|
|
|
3258
3264
|
if ((_row$subRows = row.subRows) != null && _row$subRows.length) {
|
|
3259
3265
|
const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3260
3266
|
newRow.columnFilters = row.columnFilters;
|
|
3261
|
-
newRow.subRows = recurseFilterRows(row.subRows);
|
|
3267
|
+
newRow.subRows = recurseFilterRows(row.subRows, depth + 1);
|
|
3262
3268
|
|
|
3263
3269
|
if (!newRow.subRows.length) {
|
|
3264
3270
|
continue;
|
|
@@ -3288,6 +3294,9 @@ function filterRowModelFromRoot(rowsToFilter, filterRow, instance) {
|
|
|
3288
3294
|
const newFilteredRowsById = {}; // Filters top level and nested rows
|
|
3289
3295
|
|
|
3290
3296
|
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3297
|
+
if (depth === void 0) {
|
|
3298
|
+
depth = 0;
|
|
3299
|
+
}
|
|
3291
3300
|
|
|
3292
3301
|
// Filter from parents downward first
|
|
3293
3302
|
const rows = []; // Apply the filter to any subRows
|
|
@@ -3301,7 +3310,7 @@ function filterRowModelFromRoot(rowsToFilter, filterRow, instance) {
|
|
|
3301
3310
|
|
|
3302
3311
|
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
|
|
3303
3312
|
const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3304
|
-
newRow.subRows = recurseFilterRows(row.subRows);
|
|
3313
|
+
newRow.subRows = recurseFilterRows(row.subRows, depth + 1);
|
|
3305
3314
|
row = newRow;
|
|
3306
3315
|
}
|
|
3307
3316
|
|