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

fix(pagination): any page outside the range is also first or last #6252

Merged
merged 3 commits into from
Jun 27, 2024

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Jun 26, 2024

Summary

If the page is outside the range, it should behave like the 0th or last page. This disables the relevant buttons and links, which makes more sense UX-wise, and avoids creating pages that don't exist when you start from an invalid URL.

CR-6249

Result

  • Page >= limit page is considered last page
  • negative page or page 0 is considered first page

@Haroenv Haroenv requested review from a team, dhayab and sarahdayan and removed request for a team June 26, 2024 21:20
Copy link

codesandbox-ci bot commented Jun 26, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 796c283:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

Copy link
Member

@aymeric-giraudet aymeric-giraudet left a comment

Choose a reason for hiding this comment

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

Makes sense !
Idk why the bundlesize step is acting up though 😥 all good now !

@Haroenv Haroenv merged commit 7cbaf53 into master Jun 27, 2024
12 checks passed
@Haroenv Haroenv deleted the fix/pagination-past-range branch June 27, 2024 20:27
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.

None yet

2 participants