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

Page not reloading after clicking next on pagination #71

Closed
itsvvishnu opened this issue Oct 18, 2020 · 6 comments
Closed

Page not reloading after clicking next on pagination #71

itsvvishnu opened this issue Oct 18, 2020 · 6 comments
Assignees

Comments

@itsvvishnu
Copy link
Contributor

When I load new issues by clicking "find issues" then go to next pages and come back and click "find issues" again the data is not fetched at the first click, or the page is not refreshed at the first click. when i click twice, it works properly

@trybick
Copy link
Owner

trybick commented Oct 18, 2020

Hey @itsvvishnu the Get Issues button is disabled for a few seconds when getIssues is called and getIssues is called when the page changes (handlePageChange). It's designed to prevent users from clicking the button too fast and making too many requests. If you have any ideas how to improve it, let me know! (or feel free to open a PR).

(might also be isButtonLocked that's causing it)
https://github.com/trybick/issue-collab/blob/master/src/components/App.jsx#L235

@itsvvishnu
Copy link
Contributor Author

itsvvishnu commented Oct 18, 2020

I waited for the button to become active again then pressed it, but the page didn't refresh,

@trybick
Copy link
Owner

trybick commented Oct 18, 2020

Could you share a video clip/gif?

@tianlangwu
Copy link
Contributor

When I click the "find Issue" on the second page, it will still return the same page at the first click, but the second click would work.
2020-10-20-12-42-02

@trybick
Copy link
Owner

trybick commented Oct 20, 2020

Ah I see. So to reproduce:

  • Click Find Issues
  • Scroll to bottom of page and click Next page
  • Click Find Issues again (observe it doesn't work)
  • Click Find Issues a second time (observe it loads the first page)

If anyone wants to take a look at making a PR, let me know and we can assign this to you. We might want to consider the desired behavior - maybe clicking Find Issues on the second page should reset everything first and go back to normal behavior of loading page 1.

@tianlangwu
Copy link
Contributor

I would like to work on this. Could you please assign it to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants