@redsift/table 12.5.4-muiv6-alpha.2 → 12.5.4-muiv6

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.
@@ -10901,8 +10901,12 @@ const ServerSideControlledPagination = _ref4 => {
10901
10901
  pageSize: paginationModel.pageSize
10902
10902
  }),
10903
10903
  rowsPerPage: paginationModel.pageSize,
10904
- onRowsPerPageChange: event => onPaginationModelChange({
10905
- page: paginationModel.page,
10904
+ onRowsPerPageChange: event =>
10905
+ // Reset to page 0 when pageSize changes — keeping the same page index would
10906
+ // commonly leave the user past the end of the data (e.g. page 2 of 50 → page 2
10907
+ // of 100 when there are only 84 total rows), producing a "101-84 of 84" label.
10908
+ onPaginationModelChange({
10909
+ page: 0,
10906
10910
  pageSize: parseInt(event.target.value, 10)
10907
10911
  }),
10908
10912
  rowsPerPageOptions: displayRowsPerPage ? pageSizeOptions : []
@@ -10972,8 +10976,10 @@ const ControlledPagination = _ref3 => {
10972
10976
  },
10973
10977
  rowsPerPage: paginationModel.pageSize,
10974
10978
  onRowsPerPageChange: event => {
10979
+ // Reset to page 0 when pageSize changes — keeping the same page index would
10980
+ // commonly leave the user past the end of the data.
10975
10981
  onPaginationModelChange({
10976
- page: paginationModel.page,
10982
+ page: 0,
10977
10983
  pageSize: parseInt(event.target.value, 10)
10978
10984
  });
10979
10985
  },