@tanstack/svelte-table 8.0.0-beta.9 → 8.0.3
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 +7 -13
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +7 -13
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/umd/index.development.js +7 -13
- 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/stats-react.json +0 -205
- package/build/types/index.d.ts +0 -11
- package/build/types/placeholder.d.ts +0 -3
- package/build/types/render-component.d.ts +0 -3
package/build/esm/index.js
CHANGED
|
@@ -1334,7 +1334,10 @@ function shouldAutoRemoveFilter(filterFn, value, column) {
|
|
|
1334
1334
|
const sum = (columnId, _leafRows, childRows) => {
|
|
1335
1335
|
// It's faster to just add the aggregations together instead of
|
|
1336
1336
|
// process leaf nodes individually
|
|
1337
|
-
return childRows.reduce((sum, next) =>
|
|
1337
|
+
return childRows.reduce((sum, next) => {
|
|
1338
|
+
const nextValue = next.getValue(columnId);
|
|
1339
|
+
return sum + (typeof nextValue === 'number' ? nextValue : 0);
|
|
1340
|
+
}, 0);
|
|
1338
1341
|
};
|
|
1339
1342
|
|
|
1340
1343
|
const min = (columnId, _leafRows, childRows) => {
|
|
@@ -2307,9 +2310,6 @@ function selectRowsFn(instance, rowModel) {
|
|
|
2307
2310
|
const newSelectedRowsById = {}; // Filters top level and nested rows
|
|
2308
2311
|
|
|
2309
2312
|
const recurseRows = function (rows, depth) {
|
|
2310
|
-
if (depth === void 0) {
|
|
2311
|
-
depth = 0;
|
|
2312
|
-
}
|
|
2313
2313
|
|
|
2314
2314
|
return rows.map(row => {
|
|
2315
2315
|
var _row$subRows2;
|
|
@@ -2323,7 +2323,7 @@ function selectRowsFn(instance, rowModel) {
|
|
|
2323
2323
|
|
|
2324
2324
|
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
|
|
2325
2325
|
row = { ...row,
|
|
2326
|
-
subRows: recurseRows(row.subRows
|
|
2326
|
+
subRows: recurseRows(row.subRows)
|
|
2327
2327
|
};
|
|
2328
2328
|
}
|
|
2329
2329
|
|
|
@@ -3248,9 +3248,6 @@ function filterRowModelFromLeafs(rowsToFilter, filterRow, instance) {
|
|
|
3248
3248
|
const newFilteredRowsById = {};
|
|
3249
3249
|
|
|
3250
3250
|
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3251
|
-
if (depth === void 0) {
|
|
3252
|
-
depth = 0;
|
|
3253
|
-
}
|
|
3254
3251
|
|
|
3255
3252
|
const rows = []; // Filter from children up first
|
|
3256
3253
|
|
|
@@ -3262,7 +3259,7 @@ function filterRowModelFromLeafs(rowsToFilter, filterRow, instance) {
|
|
|
3262
3259
|
if ((_row$subRows = row.subRows) != null && _row$subRows.length) {
|
|
3263
3260
|
const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3264
3261
|
newRow.columnFilters = row.columnFilters;
|
|
3265
|
-
newRow.subRows = recurseFilterRows(row.subRows
|
|
3262
|
+
newRow.subRows = recurseFilterRows(row.subRows);
|
|
3266
3263
|
|
|
3267
3264
|
if (!newRow.subRows.length) {
|
|
3268
3265
|
continue;
|
|
@@ -3292,9 +3289,6 @@ function filterRowModelFromRoot(rowsToFilter, filterRow, instance) {
|
|
|
3292
3289
|
const newFilteredRowsById = {}; // Filters top level and nested rows
|
|
3293
3290
|
|
|
3294
3291
|
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3295
|
-
if (depth === void 0) {
|
|
3296
|
-
depth = 0;
|
|
3297
|
-
}
|
|
3298
3292
|
|
|
3299
3293
|
// Filter from parents downward first
|
|
3300
3294
|
const rows = []; // Apply the filter to any subRows
|
|
@@ -3308,7 +3302,7 @@ function filterRowModelFromRoot(rowsToFilter, filterRow, instance) {
|
|
|
3308
3302
|
|
|
3309
3303
|
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
|
|
3310
3304
|
const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3311
|
-
newRow.subRows = recurseFilterRows(row.subRows
|
|
3305
|
+
newRow.subRows = recurseFilterRows(row.subRows);
|
|
3312
3306
|
row = newRow;
|
|
3313
3307
|
}
|
|
3314
3308
|
|