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