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

Bugfix/381 pagination errors #444

Merged
merged 3 commits into from
Feb 17, 2025
Merged

Bugfix/381 pagination errors #444

merged 3 commits into from
Feb 17, 2025

Conversation

Jipperism
Copy link
Contributor

@Jipperism Jipperism commented Feb 12, 2025

@holkexyz This PR should resolve the issues with pagination, please have a look.

It also fixes the styling so you know which page you are currently on, and always renders both first and last buttons at the bottom next to pagination to prevent the page numbers from jumping around between pages.

It also redirects you back to the first page when you go beyond the last one. We could just as easily set this to redirect you to the last page, it's up to you.

Copy link

vercel bot commented Feb 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hypercerts-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 7:46pm

@holkexyz
Copy link
Member

Great, works well for me. Thanks

Redirecting to the last page if I enter a higher page number in the URL makes most sense to me.

Adds validation to redirect to first page when current page exceeds total pages
- Add disabled prop to PaginationButton component
- Modify pagination button rendering to always show first/previous/next/last buttons to prevent components jumping across pages
- Disable navigation buttons when at page boundaries
- Update button styling for active and disabled states
@Jipperism Jipperism force-pushed the bugfix/381-pagination-errors branch from 07e7e3d to 3407647 Compare February 12, 2025 19:44
@Jipperism Jipperism requested a review from pheuberger February 12, 2025 19:45
@Jipperism
Copy link
Contributor Author

@holkexyz ok, redirects to last page now

@Jipperism Jipperism merged commit 49013ae into dev Feb 17, 2025
2 checks passed
@Jipperism Jipperism deleted the bugfix/381-pagination-errors branch February 17, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[bug] pagination doesn't work properly
3 participants