-
Notifications
You must be signed in to change notification settings - Fork 15
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
[ER-45674] Allow not providing totalCount for compact Pagination #4673
base: master
Are you sure you want to change the base?
Conversation
|
@toptal-bot run package:alpha-release |
Your alpha package is ready 🎉 |
@toptal-anvil ping reviewers |
@toptal-anvil ping reviewers |
@@ -26,7 +26,6 @@ const Example = () => ( | |||
<Pagination | |||
activePage={3} | |||
onPageChange={handlePageChange} | |||
totalPages={5} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to also show a variant with nextDisabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked docs - generated props descriptions look good 👍 Code looks great, thanks for playing around with TS ❤️
ER-45674
Description
Sometimes the backend doesn't have the total number results for a query (for example because getting the total count is expensive)
<Pagination variant="compact">
UX works well for this use case, but the component expectstotalPages
. This removes the requirement.When we don't have the
totalPages
we can't know in which page we are, so we can't know if we're in the last page to show the button disabled (we can know when we are on the first one though). To fix, this also adds anextDisabled
prop.How to test
Screenshots
See storybook
Development checks
picasso-tailwind-merge
requires major update (check itsREADME.md
)props
in component with documentationexamples
for componentBreaking change
PR commands
List of available commands:
@toptal-bot run package:alpha-release
- Release alpha version@toptal-anvil ping reviewers
- Ping for reviewsPR Review Guidelines
When to approve? ✅
You are OK with merging this PR and
nit:
to your comment. (ex.nit: I'd rename this variable from makeCircle to getCircle
)When to request changes? ❌
You are not OK with merging this PR because
When to comment (neither ✅ nor ❌)
You want your comments to be addressed before merging this PR in cases like:
How to handle the comments?