@tanstack/react-table 8.0.0-beta.9 → 8.0.4
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 +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 -90
- package/build/types/index.d.ts +0 -16
package/build/stats-html.html
CHANGED
|
@@ -2669,7 +2669,7 @@ var drawChart = (function (exports) {
|
|
|
2669
2669
|
</script>
|
|
2670
2670
|
<script>
|
|
2671
2671
|
/*<!--*/
|
|
2672
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"
|
|
2672
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"edd0-127"},{"name":"react-table/src/index.tsx","uid":"edd0-129"}]}]}],"isRoot":true},"nodeParts":{"edd0-127":{"renderedLength":139117,"gzipLength":23688,"brotliLength":0,"mainUid":"edd0-126"},"edd0-129":{"renderedLength":2135,"gzipLength":854,"brotliLength":0,"mainUid":"edd0-128"}},"nodeMetas":{"edd0-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"edd0-127"},"imported":[],"importedBy":[{"uid":"edd0-128"}]},"edd0-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"edd0-129"},"imported":[{"uid":"edd0-130"},{"uid":"edd0-126"}],"importedBy":[],"isEntry":true},"edd0-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"edd0-128"}],"isExternal":true}},"env":{"rollup":"2.75.7"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
2673
2673
|
|
|
2674
2674
|
const run = () => {
|
|
2675
2675
|
const width = window.innerWidth;
|
|
@@ -1355,7 +1355,10 @@
|
|
|
1355
1355
|
const sum = (columnId, _leafRows, childRows) => {
|
|
1356
1356
|
// It's faster to just add the aggregations together instead of
|
|
1357
1357
|
// process leaf nodes individually
|
|
1358
|
-
return childRows.reduce((sum, next) =>
|
|
1358
|
+
return childRows.reduce((sum, next) => {
|
|
1359
|
+
const nextValue = next.getValue(columnId);
|
|
1360
|
+
return sum + (typeof nextValue === 'number' ? nextValue : 0);
|
|
1361
|
+
}, 0);
|
|
1359
1362
|
};
|
|
1360
1363
|
|
|
1361
1364
|
const min = (columnId, _leafRows, childRows) => {
|
|
@@ -2328,9 +2331,6 @@
|
|
|
2328
2331
|
const newSelectedRowsById = {}; // Filters top level and nested rows
|
|
2329
2332
|
|
|
2330
2333
|
const recurseRows = function (rows, depth) {
|
|
2331
|
-
if (depth === void 0) {
|
|
2332
|
-
depth = 0;
|
|
2333
|
-
}
|
|
2334
2334
|
|
|
2335
2335
|
return rows.map(row => {
|
|
2336
2336
|
var _row$subRows2;
|
|
@@ -2344,7 +2344,7 @@
|
|
|
2344
2344
|
|
|
2345
2345
|
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
|
|
2346
2346
|
row = { ...row,
|
|
2347
|
-
subRows: recurseRows(row.subRows
|
|
2347
|
+
subRows: recurseRows(row.subRows)
|
|
2348
2348
|
};
|
|
2349
2349
|
}
|
|
2350
2350
|
|
|
@@ -3267,9 +3267,6 @@
|
|
|
3267
3267
|
const newFilteredRowsById = {};
|
|
3268
3268
|
|
|
3269
3269
|
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3270
|
-
if (depth === void 0) {
|
|
3271
|
-
depth = 0;
|
|
3272
|
-
}
|
|
3273
3270
|
|
|
3274
3271
|
const rows = []; // Filter from children up first
|
|
3275
3272
|
|
|
@@ -3281,7 +3278,7 @@
|
|
|
3281
3278
|
if ((_row$subRows = row.subRows) != null && _row$subRows.length) {
|
|
3282
3279
|
const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3283
3280
|
newRow.columnFilters = row.columnFilters;
|
|
3284
|
-
newRow.subRows = recurseFilterRows(row.subRows
|
|
3281
|
+
newRow.subRows = recurseFilterRows(row.subRows);
|
|
3285
3282
|
|
|
3286
3283
|
if (!newRow.subRows.length) {
|
|
3287
3284
|
continue;
|
|
@@ -3311,9 +3308,6 @@
|
|
|
3311
3308
|
const newFilteredRowsById = {}; // Filters top level and nested rows
|
|
3312
3309
|
|
|
3313
3310
|
const recurseFilterRows = function (rowsToFilter, depth) {
|
|
3314
|
-
if (depth === void 0) {
|
|
3315
|
-
depth = 0;
|
|
3316
|
-
}
|
|
3317
3311
|
|
|
3318
3312
|
// Filter from parents downward first
|
|
3319
3313
|
const rows = []; // Apply the filter to any subRows
|
|
@@ -3327,7 +3321,7 @@
|
|
|
3327
3321
|
|
|
3328
3322
|
if ((_row$subRows2 = row.subRows) != null && _row$subRows2.length) {
|
|
3329
3323
|
const newRow = createRow(instance, row.id, row.original, row.index, row.depth);
|
|
3330
|
-
newRow.subRows = recurseFilterRows(row.subRows
|
|
3324
|
+
newRow.subRows = recurseFilterRows(row.subRows);
|
|
3331
3325
|
row = newRow;
|
|
3332
3326
|
}
|
|
3333
3327
|
|