You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.
Describe the bug
The currentPageIdx in PageControl component is not updated when totalPages prop is updated from the parent component. There is a possibility of a totalPages decreasing and if currentPageIdx is greater than the newly passed totalPages prop, it causes unexpected behavior.
To Reproduce
This is not in production yet. To effective reproduce this, create the component in HomePage with like following,
Expected behavior
The PageControl should automatically change it's state to currently available last page if total pages count becomes less than the current page index.
Screenshots
Additional context
In context with our application, this case could arise when user chooses to delete the only available URL in the last page of UserShortLinksSection.
The text was updated successfully, but these errors were encountered:
Please see #748. A better solution has been proposed by @byliuyang to use cursor-based pagination instead of the current setup which relies on a total number of pages value.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugSomething isn't workingp0High priorityReactIssue requires knowledge of React framework
Describe the bug
The
currentPageIdx
inPageControl
component is not updated whentotalPages
prop is updated from the parent component. There is a possibility of atotalPages
decreasing and ifcurrentPageIdx
is greater than the newly passedtotalPages
prop, it causes unexpected behavior.To Reproduce
This is not in production yet. To effective reproduce this, create the component in HomePage with like following,
Expected behavior
The PageControl should automatically change it's state to currently available last page if total pages count becomes less than the current page index.
Screenshots
Additional context
In context with our application, this case could arise when user chooses to delete the only available URL in the last page of UserShortLinksSection.
The text was updated successfully, but these errors were encountered: