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

Support 'labelRowsPerPage' prop on Pagination #10259

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

afilp
Copy link
Contributor

@afilp afilp commented Oct 4, 2024

I have a use case where I do not want to use the translated text but a conditionally different one.

Problem

I have a calendar and want to restrict the number of events per month on each call, so I need pagination on that "List" (that just uses a calendar). So, I do not want the pagination label to be called "Rows per page" there but rather "Events Shown on Calendar".

I cannot do this as the code is now.

image

Solution

Support the 'labelRowsPerPage' as a prop that we can use it.

How To Test

Describe the steps required to test the changes

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

I have a user case where I do not want to use the translated text but conditionally change it.
@fzaninotto
Copy link
Member

Thanks for you PR.

There are more labels in this component than just the "rows per page". Providing a way to override one and not the others leads to a half-baked functionality. So I'm reluctant to merge your contribution as is. Also, it lacks documentation.

Besides, what you ask is achievable in user land without too much hassle, so I wonder if we should move forward with this PR or not.

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.

2 participants