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 logic to change perPage in component ListWithOwnState states when new perPage prop arrives #17278

Merged
merged 7 commits into from Nov 14, 2023

Conversation

maxiadlovskii
Copy link
Contributor

@maxiadlovskii maxiadlovskii commented Nov 14, 2023

Description

The bug happens because we update per page value only on the render stage. This PR adds useEffect which changes the inner state of the ListWithOwnState component.

Motivation and Context

fix: #17261

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

/nocl

Copy link
Contributor

@linuspahl linuspahl left a comment

Choose a reason for hiding this comment

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

Looks good, I tested different pagination list use cases and could not find a problem.

@linuspahl linuspahl merged commit df0e7e3 into master Nov 14, 2023
5 of 7 checks passed
@linuspahl linuspahl deleted the fix/Fix-bug-with-pagination-per-page branch November 14, 2023 14:40
linuspahl pushed a commit that referenced this pull request Nov 14, 2023
… new perPage prop arrives (#17278)

* Add logic to change perPage in state of ListWithOwnState component when new perPage prop would arrive

* Some refactoring

* Add changelog

* fix changelog

* fix changelog

* fix changelog
linuspahl pushed a commit that referenced this pull request Nov 14, 2023
… new perPage prop arrives (#17278)

* Add logic to change perPage in state of ListWithOwnState component when new perPage prop would arrive

* Some refactoring

* Add changelog

* fix changelog

* fix changelog

* fix changelog
maxiadlovskii pushed a commit that referenced this pull request Nov 14, 2023
maxiadlovskii pushed a commit that referenced this pull request Nov 14, 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.

Saved searches pagination do not change the pages list when per page parameter changed
2 participants