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

Add prop to omit the last index from the Paginator center button #2467

Open
arg274 opened this issue Feb 6, 2024 · 0 comments
Open

Add prop to omit the last index from the Paginator center button #2467

arg274 opened this issue Feb 6, 2024 · 0 comments
Labels
feature request Request a feature or introduce and update to the project.
Milestone

Comments

@arg274
Copy link

arg274 commented Feb 6, 2024

Describe the feature in detail (code, mocks, or screenshots encouraged)

Currently, when showNumerals is false, the text at the center showing the current group of items always includes the last index. This makes sense for amount values that are greater than 1, but feels awkward when there's only 1 item being shown as the text reads "1-1", "2-2" and so on.

image

The source code seems to indicate that it's not configurable:

<button type="button" class="{buttonClasses} pointer-events-none !text-sm">
  {settings.page * settings.limit + 1}-{Math.min(settings.page * settings.limit + settings.limit, settings.size)}&nbsp;<span
	  class="opacity-50">{separatorText} {settings.size}</span>
</button>

This can definitely be worked around but a prop to omit the hyphen and the last index that comes after it would be appreciated.

What type of pull request would this be?

Enhancement

Provide relevant links or additional information.

No response

@arg274 arg274 added the feature request Request a feature or introduce and update to the project. label Feb 6, 2024
@endigo9740 endigo9740 added this to the v2.0 milestone Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a feature or introduce and update to the project.
Projects
None yet
Development

No branches or pull requests

2 participants