-
Notifications
You must be signed in to change notification settings - Fork 375
fix(Pagination): default page should be 1 #9201
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
Conversation
|
Preview: https://patternfly-react-pr-9201.surge.sh A11y report: https://patternfly-react-pr-9201-a11y.surge.sh |
gitdallas
left a comment
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.
lgtm, wonder if we should add an offset example though
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.
@MariaAga this is looking good! Seems like the indeterminate example is now getting set to "1 -20 of 0" but it should be "1 - 20 of many" - can we update this so it sets the toggle text correctly?
|
@jenny-s51 I fixed it here: #9203 |
| page: pageProp = 0, | ||
| offset = 0, | ||
| page: pageProp = 1, | ||
| offset = null, |
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.
could this be undefined?
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.
Other props in Pagination also have a default value of null like itemsStart = null, itemsEnd = null,
and usually its not recomended to set values to undefined
tlabaj
left a comment
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.
Lgtm
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #9165
I'm not sure why the default is set to 0 here: #3383
but users cant type in 0 anyway because of:
patternfly-react/packages/react-core/src/components/Pagination/Navigation.tsx
Line 100 in 1da6f5e