Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pagination issue with proposal table #924

Merged
merged 2 commits into from
Feb 10, 2025
Merged

fix: pagination issue with proposal table #924

merged 2 commits into from
Feb 10, 2025

Conversation

deepaksftc
Copy link
Contributor

@deepaksftc deepaksftc commented Jan 27, 2025

Description

This PR addresses a pagination issue with the proposal table by modifying the onPageChange function in the ProposalTableOfficer component.

Motivation and Context

The pagination problem in the proposal table was causing data loading and user interface issues. The current implementation was not correctly updating the page size when changing pages, which led to incorrect data being displayed.

Changes

  • Removed the pageSize parameter from the onPageChange function within the ProposalTableOfficer component. This change ensures that the page size remains consistent when navigating through different pages of the proposal table.
  • The onPageChange function now only updates the page parameter in the setSearchParams function. This adjustment ensures that the correct data is loaded when the page is changed.

How Has This Been Tested?

Fixes Jira Issue

https://jira.esss.lu.se/browse/

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@deepaksftc deepaksftc requested review from a team and Junjiequan and removed request for a team January 29, 2025 10:20
@deepaksftc deepaksftc marked this pull request as ready for review January 29, 2025 10:20
@deepaksftc deepaksftc requested a review from a team as a code owner January 29, 2025 10:20
@deepaksftc deepaksftc requested review from EdwardHaynes and removed request for a team January 29, 2025 10:20
@deepaksftc deepaksftc requested review from a team, RasmiaKulan, mutambaraf and yoganandaness and removed request for a team January 29, 2025 10:42
page: page.toString(),
pageSize: pageSize.toString(),
});
searchParams.set('search', page.toString());
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use the setSearchParams instead of mutating the searchParams directly. Just following the recommended approach. Correct me if I am wrong.

@deepaksftc deepaksftc force-pushed the 1322 branch 7 times, most recently from b3deba9 to b7a7229 Compare February 5, 2025 15:37
@deepaksftc deepaksftc merged commit 0f621b4 into develop Feb 10, 2025
20 checks passed
@deepaksftc deepaksftc deleted the 1322 branch February 10, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants