-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Pagination resets after filtering #3703
Comments
Thanks for reporting. Reproduced |
@Kmaschta, @fzaninotto, @djhi PR created - take a look, please. Also, please feel free to propose any better solution. |
Fixed by #3716 |
This bug is back. I think that it is related to |
Confirmed. I'm reopening the bug. |
I've found the bug. It's in <Form
onSubmit={handleFinalFormSubmit}
initialValues={mergedInitialValuesWithDefaultValues}
render={formProps => (
<>
<FormSpy
subscription={FormSpySubscription}
onChange={({ pristine, values }) => {
if (pristine) {
return;
}
props && props.setFilters(values);
}}
/>
<FilterForm classes={classes} {...formProps} {...rest} />
</>
)}
/> When a user adds a filter, the Unfortunately, unless we rewrite final-form's |
Fixed by #4000 |
What you were expecting:
After new value added to some filter field, pagination per page value doesn't reset to default.
What happened instead:
When I choose not default value of per page and change some filter value, per page value resets to default value of 10.
Steps to reproduce:
Related code:
https://codesandbox.io/s/mystifying-silence-dvjev
Environment
React-admin version: 3.0.0-alpha.4
React version: 16.9.0
Browser: Chrome
The text was updated successfully, but these errors were encountered: