OBPIH-6932 Incorrect page indicator after changing rows per page#5011
OBPIH-6932 Incorrect page indicator after changing rows per page#5011awalkowiak merged 1 commit intodevelopfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5011 +/- ##
============================================
+ Coverage 7.74% 7.81% +0.07%
- Complexity 855 866 +11
============================================
Files 613 613
Lines 42621 42621
Branches 10350 10350
============================================
+ Hits 3302 3332 +30
+ Misses 38825 38789 -36
- Partials 494 500 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| const onPageSizeChange = (selectedPageSize) => { | ||
| setPagination((prev) => ({ | ||
| ...prev, | ||
| const newPageIndex = Math.floor( |
There was a problem hiding this comment.
Couldn't we just switch back to the first page on page size change? Looks like on all new list pages we are "sticking" to the current page as well, so I guess that's fine.
There was a problem hiding this comment.
It was requested in the ticket to behave like that.
There was a problem hiding this comment.
My other question would be - why do we have to add this hook? Is there nothing out of the box provided by react table for this exact purpose?
There was a problem hiding this comment.
React table handles only frontend pagination, when it is done "server-side" it should be done manually (there is a flag already passed to the table manualPagination: true)
✨ Description of Change
Link to GitHub issue or Jira ticket:
Description:
📷 Screenshots & Recordings (optional)