-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Component stateChange resetting table pageSize when using remote data feature #1941
Comments
You should keep pageSize as a state variable and update it when the page size changes Example: https://codesandbox.io/s/change-state-page-size-40sju
|
Thank you for the suggestion I'll give it a go! Anyway I do think that this behavior is a bug and it should be fixed |
It seems like this line is the problem:
But I do not know, why the page size could be changed if the remote data is given. But clearly, there was a reason do add this condition, so maybe @mbrn could tell us, if this check is necessary or not? It was added in #1353 so I do not think it could just be removed. |
Are there any updates regarding this issue? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required. |
Describe the bug
I saw different issues talking about the same bug but not in the same way I'm experiencing it.
I have a component that displays the table and also a drop down list that on selection changes the state of the component.
Each time the state is being updated the table page size is being reset to the default value (in the default options case it's 5).
It seems as the table saves the actual pageSize because when triggering any change to the data, going to the next page for example, the page size is the actual selected size.
I've noticed that there are a few PRs regarding the issue of the page size being reset, is there any updates regarding when this issue will be fixed?
To Reproduce
https://codesandbox.io/s/change-state-page-size-yxhk0?file=/src/App.js
Steps to reproduce the behavior:
Expected behavior
When the state changes the table should not reset to the default page size
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: