fix: handle zero pages edge case in Pagination component#528
Merged
ECWireless merged 3 commits intorefactor/seperate-pagination-componentfrom Feb 2, 2026
Merged
fix: handle zero pages edge case in Pagination component#528ECWireless merged 3 commits intorefactor/seperate-pagination-componentfrom
ECWireless merged 3 commits intorefactor/seperate-pagination-componentfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: rickstaa <17570430+rickstaa@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] WIP address feedback on table pagination component refactor
fix: handle zero pages edge case in Pagination component
Feb 1, 2026
ECWireless
approved these changes
Feb 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a UI edge case in the Pagination component by preventing the display of "Page 1 of 0" when no data is available. The fix adds an early return that hides pagination controls entirely when totalPages === 0, addressing feedback from PR #527 where the Pagination component was initially extracted as a reusable component.
Changes:
- Added zero pages check with early return in Pagination component to hide controls when no pages exist
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
c5dcce7
into
refactor/seperate-pagination-component
2 checks passed
ECWireless
added a commit
that referenced
this pull request
Feb 2, 2026
* refactor: extract table pagination into reusable component Move table pagination logic into seperate component so it can be reused across the app. Co-authored-by: roaring30s <okaaycrypto@gmail.com> * fix: handle zero pages edge case in Pagination component (#528) * Initial plan * fix: hide pagination when totalPages is 0 Co-authored-by: rickstaa <17570430+rickstaa@users.noreply.github.com> * Update components/Table/Pagination.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rickstaa <17570430+rickstaa@users.noreply.github.com> Co-authored-by: ECWireless <40322776+ECWireless@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: add accessibility attributes to Pagination * chore: simplify totalPages check in Pagination --------- Co-authored-by: roaring30s <okaaycrypto@gmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: rickstaa <17570430+rickstaa@users.noreply.github.com> Co-authored-by: ECWireless <40322776+ECWireless@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: ECWireless <elliott@coopallc.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses review feedback from #527 to prevent displaying "Page 1 of 0" when no data exists.
Changes
totalPages === 0to hide pagination controls entirely💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.