@tanstack/react-table 8.5.22 → 8.5.25
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/table-core/build/esm/index.js +20 -9
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +20 -9
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +17 -17
- package/build/umd/index.development.js +20 -9
- 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
|
@@ -1480,7 +1480,7 @@ const Pagination = {
|
|
|
1480
1480
|
table.setPagination(old => {
|
|
1481
1481
|
let pageIndex = functionalUpdate(updater, old.pageIndex);
|
|
1482
1482
|
const maxPageIndex = typeof table.options.pageCount === 'undefined' || table.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : table.options.pageCount - 1;
|
|
1483
|
-
pageIndex = Math.
|
|
1483
|
+
pageIndex = Math.max(0, Math.min(pageIndex, maxPageIndex));
|
|
1484
1484
|
return {
|
|
1485
1485
|
...old,
|
|
1486
1486
|
pageIndex
|
|
@@ -2856,19 +2856,30 @@ function filterRowModelFromLeafs(rowsToFilter, filterRow, table) {
|
|
|
2856
2856
|
for (let i = 0; i < rowsToFilter.length; i++) {
|
|
2857
2857
|
var _row$subRows;
|
|
2858
2858
|
let row = rowsToFilter[i];
|
|
2859
|
+
const newRow = createRow(table, row.id, row.original, row.index, row.depth);
|
|
2860
|
+
newRow.columnFilters = row.columnFilters;
|
|
2859
2861
|
if ((_row$subRows = row.subRows) != null && _row$subRows.length) {
|
|
2860
|
-
const newRow = createRow(table, row.id, row.original, row.index, row.depth);
|
|
2861
|
-
newRow.columnFilters = row.columnFilters;
|
|
2862
2862
|
newRow.subRows = recurseFilterRows(row.subRows);
|
|
2863
|
-
|
|
2863
|
+
row = newRow;
|
|
2864
|
+
if (filterRow(row) && !newRow.subRows.length) {
|
|
2865
|
+
rows.push(row);
|
|
2866
|
+
newFilteredRowsById[row.id] = row;
|
|
2867
|
+
newFilteredRowsById[i] = row;
|
|
2868
|
+
continue;
|
|
2869
|
+
}
|
|
2870
|
+
if (filterRow(row) || newRow.subRows.length) {
|
|
2871
|
+
rows.push(row);
|
|
2872
|
+
newFilteredRowsById[row.id] = row;
|
|
2873
|
+
newFilteredRowsById[i] = row;
|
|
2864
2874
|
continue;
|
|
2865
2875
|
}
|
|
2876
|
+
} else {
|
|
2866
2877
|
row = newRow;
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2878
|
+
if (filterRow(row)) {
|
|
2879
|
+
rows.push(row);
|
|
2880
|
+
newFilteredRowsById[row.id] = row;
|
|
2881
|
+
newFilteredRowsById[i] = row;
|
|
2882
|
+
}
|
|
2872
2883
|
}
|
|
2873
2884
|
}
|
|
2874
2885
|
return rows;
|