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

chore: fix pagination in the files page #180

Merged
merged 2 commits into from Jul 27, 2021

Conversation

rafaelramalho19
Copy link
Contributor

@rafaelramalho19 rafaelramalho19 commented Jul 26, 2021

  • Fixes pagination for the files page (only shows next button if there's actually more items to show)

I feel like I cheated the system, but I'm fetching 25 items and only showing 24 in the UI, and only if we have 25+ items left, it shows the "next"

Related to #178

@alanshaw
Copy link
Member

You could fetch 26 and then still show a nice round 25 in the UI...

@jnthnvctr
Copy link
Contributor

I might be missing something - in the UI i thought I counted 25?

I think what was happening is you show the button when theres 25 items, but the button doesn't take you anywhere (so its disabled).

@rafaelramalho19
Copy link
Contributor Author

rafaelramalho19 commented Jul 27, 2021

You could fetch 26 and then still show a nice round 25 in the UI...

It does show 25 now, I changed the variable to be 25 + 1 so it's easier to realize in the future that the size requires 1 extra element to be fetched

@rafaelramalho19 rafaelramalho19 merged commit 5b897cc into main Jul 27, 2021
@rafaelramalho19 rafaelramalho19 deleted the chore/files-pagination-fix branch July 27, 2021 11:37
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

Successfully merging this pull request may close these issues.

None yet

3 participants