Skip to content

Conversation

@MariaAga
Copy link
Contributor

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:

inputPage = inputPage < 1 ? 1 : inputPage;

@patternfly-build
Copy link
Contributor

patternfly-build commented May 26, 2023

Copy link
Contributor

@gitdallas gitdallas left a 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

Copy link
Contributor

@jenny-s51 jenny-s51 left a 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?

@MariaAga
Copy link
Contributor Author

MariaAga commented Jun 1, 2023

@jenny-s51 I fixed it here: #9203
@gitdallas I can add it in a separate pr this week

page: pageProp = 0,
offset = 0,
page: pageProp = 1,
offset = null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be undefined?

Copy link
Contributor Author

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

Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@tlabaj tlabaj merged commit 27b2c14 into patternfly:v5 Jun 2, 2023
@patternfly-build
Copy link
Contributor

Your changes have been released in:

  • @patternfly/react-code-editor@5.0.0-alpha.133
  • @patternfly/react-core@5.0.0-alpha.132
  • @patternfly/react-docs@6.0.0-alpha.142
  • demo-app-ts@5.0.0-alpha.116
  • @patternfly/react-table@5.0.0-alpha.136

Thanks for your contribution! 🎉

nicolethoen pushed a commit to Kells512/patternfly-react that referenced this pull request Sep 1, 2023
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.

Bug - Pagination - Default page renders negative first index

6 participants