Skip to content

docs: fix(pagination): show last page number when current + 1 equals pageCount#6759

Merged
alicanerdurmaz merged 2 commits into
refinedev:mainfrom
BessonovMax:patch-1
Apr 25, 2025
Merged

docs: fix(pagination): show last page number when current + 1 equals pageCount#6759
alicanerdurmaz merged 2 commits into
refinedev:mainfrom
BessonovMax:patch-1

Conversation

@BessonovMax
Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

The last page number is not shown when current + 1 === pageCount due to a strict < comparison.

What is the new behavior?

The condition has been updated to use <= to ensure the last page number is displayed properly.

@BessonovMax BessonovMax requested a review from a team as a code owner April 24, 2025 11:33
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 24, 2025

⚠️ No Changeset found

Latest commit: b8c17a2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 24, 2025

Deploy Preview for refine-doc-live-previews ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b8c17a2
🔍 Latest deploy log https://app.netlify.com/sites/refine-doc-live-previews/deploys/680a6c070157200008ce8703
😎 Deploy Preview https://deploy-preview-6759--refine-doc-live-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@alicanerdurmaz
Copy link
Copy Markdown
Collaborator

Hey @BessonovMax, looks great, thanks for improving Refine 🚀

Could you also fix other parts of code?
image

Replaced all instances of current + 1 < pageCount with current + 1 <= pageCount to correctly display last page.
@BessonovMax
Copy link
Copy Markdown
Contributor Author

Hey, @alicanerdurmaz, thanks for the feedback!😊
I’ve just pushed the changes you suggested — fixed all the other parts as well.
You can check them out in this commit: b8c17a2

@alicanerdurmaz alicanerdurmaz added this to the April 2025 Release milestone Apr 25, 2025
@alicanerdurmaz alicanerdurmaz merged commit cb85e0b into refinedev:main Apr 25, 2025
4 checks passed
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