Skip to content

OBPIH-6932 Incorrect page indicator after changing rows per page#5011

Merged
awalkowiak merged 1 commit intodevelopfrom
OBPIH-6932
Jan 24, 2025
Merged

OBPIH-6932 Incorrect page indicator after changing rows per page#5011
awalkowiak merged 1 commit intodevelopfrom
OBPIH-6932

Conversation

@alannadolny
Copy link
Collaborator

✨ Description of Change

A concise summary of what is being changed. Please provide enough context for reviewers to be able to understand the change and why it is necessary. If the issue/ticket already provides enough information, you can put "See ticket" as the description.

Link to GitHub issue or Jira ticket:

Description:


📷 Screenshots & Recordings (optional)

If this PR contains a UI change, consider adding one or more screenshots here or link to a screen recording to help reviewers visualize the change. Otherwise, you can remove this section.

@alannadolny alannadolny self-assigned this Jan 23, 2025
@github-actions github-actions bot added the domain: frontend Changes or discussions relating to the frontend UI label Jan 23, 2025
@codecov
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 7.81%. Comparing base (1392fad) to head (33edb87).
Report is 178 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

const onPageSizeChange = (selectedPageSize) => {
setPagination((prev) => ({
...prev,
const newPageIndex = Math.floor(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was requested in the ticket to behave like that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@awalkowiak awalkowiak merged commit e410ea9 into develop Jan 24, 2025
9 checks passed
@awalkowiak awalkowiak deleted the OBPIH-6932 branch January 24, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: frontend Changes or discussions relating to the frontend UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants