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: offset reset when pagination limit onchange #11703

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

sunyeongchoi
Copy link
Member

Fixes #11702

Motivation

Upon investigating the cause, it was found that when changing the pagination limit in the onChange function, the offset used as the pagination reference was not reset. Instead, the offset value received from the server was directly used.

As a solution, I have modified the onChange function to reset the offset during each change. This change ensures that when the pagination limit is modified, the search restarts from the beginning with the updated limit.

Modifications

I just set offset '' in page limit onChange function.

image

  1. Set the limit to 5 on the workflows page or workflow templates page from the frontend. and Click "Next Page."
    image

  2. While on the next page, change the limit to 10. they appear.
    image
    image

Verification

Signed-off-by: sunyeongchoi <sn0716@naver.com>
Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

Can you check if the pagination works correctly for other pages (e.g. workflows list) as well?

@sunyeongchoi
Copy link
Member Author

@terrytangyuan
Sure! :)

  1. Set the limit to 5 on the workflows page from the frontend. and Click "Next Page."
    image

  2. While on the next page, change the limit to 10. they appear.
    image

@terrytangyuan terrytangyuan merged commit f5e31f8 into argoproj:master Aug 31, 2023
23 checks passed
terrytangyuan pushed a commit that referenced this pull request Sep 5, 2023
Signed-off-by: sunyeongchoi <sn0716@naver.com>
dpadhiar pushed a commit to dpadhiar/argo-workflows that referenced this pull request May 9, 2024
Signed-off-by: sunyeongchoi <sn0716@naver.com>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A problem that is not initialized when changing the number of page limits
3 participants