@tanstack/react-table 8.5.8 → 8.5.9
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 +10 -4
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +10 -4
- 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 +10 -4
- 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
|
@@ -3795,8 +3795,13 @@ function groupBy(rows, columnId) {
|
|
|
3795
3795
|
|
|
3796
3796
|
function getExpandedRowModel() {
|
|
3797
3797
|
return table => memo(() => [table.getState().expanded, table.getPreExpandedRowModel(), table.options.paginateExpandedRows], (expanded, rowModel, paginateExpandedRows) => {
|
|
3798
|
-
if (!rowModel.rows.length ||
|
|
3799
|
-
|
|
3798
|
+
if (!rowModel.rows.length || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
|
|
3799
|
+
return rowModel;
|
|
3800
|
+
}
|
|
3801
|
+
|
|
3802
|
+
if (!paginateExpandedRows) {
|
|
3803
|
+
// Only expand rows at this point if they are being paginated
|
|
3804
|
+
console.log(rowModel.rows);
|
|
3800
3805
|
return rowModel;
|
|
3801
3806
|
}
|
|
3802
3807
|
|
|
@@ -3810,7 +3815,7 @@ function getExpandedRowModel() {
|
|
|
3810
3815
|
}
|
|
3811
3816
|
});
|
|
3812
3817
|
}
|
|
3813
|
-
function expandRows(rowModel
|
|
3818
|
+
function expandRows(rowModel) {
|
|
3814
3819
|
const expandedRows = [];
|
|
3815
3820
|
|
|
3816
3821
|
const handleRow = row => {
|
|
@@ -3832,7 +3837,7 @@ function expandRows(rowModel, table) {
|
|
|
3832
3837
|
}
|
|
3833
3838
|
|
|
3834
3839
|
function getPaginationRowModel(opts) {
|
|
3835
|
-
return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel()], (pagination, rowModel) => {
|
|
3840
|
+
return table => memo(() => [table.getState().pagination, table.getPrePaginationRowModel(), table.options.paginateExpandedRows ? undefined : table.getState().expanded], (pagination, rowModel) => {
|
|
3836
3841
|
if (!rowModel.rows.length) {
|
|
3837
3842
|
return rowModel;
|
|
3838
3843
|
}
|
|
@@ -3865,6 +3870,7 @@ function getPaginationRowModel(opts) {
|
|
|
3865
3870
|
};
|
|
3866
3871
|
}
|
|
3867
3872
|
|
|
3873
|
+
console.log(paginatedRowModel.rows);
|
|
3868
3874
|
paginatedRowModel.flatRows = [];
|
|
3869
3875
|
|
|
3870
3876
|
const handleRow = row => {
|