-
-
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
Permanent filter mapped to state value doesn't filter correctly #3132
Comments
I noticed the same problem with the ReferenceArrayInput and the filter property. |
same here. I have a ReferenceArrayInput (wrapped into a FormDataConsumer) whose filter depends on values in the formData updated from other Input components. Consolelogging the form data at each component interaction shows the right values but the rendered component is always one selection behind |
debugging in Redux Tool "@@redux-form/CHANGE" properly contains the new value ( and shows the corrected diff from previous state) but in the following Action "RA/CRUD_GET_MATCHING" the payload contains still the old values ( therefore the component is not updated) |
@manuelamaria Thanks for the report and codesandbox |
I have same problem. I have a ReferenceArrayInput (wrapped into a FormDataConsumer) and have same problem . |
@mrlaseptima this is a community project, feel free to give us a hand if this fix is critical for you. |
What you were expecting:
I mapped a permanent list filter to a state value from the redux store (with custom reducer). Let's say that's value1.
When the state value is changed, the list should be filtered by this new value (value2).
What happened instead:
Instead, the list re-renders, but it is still filtered by value1. When changing the value to value3, the list gets filtered with value2 (so always one "step" back). I logged the mapped prop to the console in the list component and it is correct. Only the api parameters "stay behind".
Related code:
I set up a Codesandbox here. Unfortunately I get some console errors there that I don't get in my real-case scenario (might be related to using a fake data provider, but I couldn't figure them out).
Thank you for considering this.
The text was updated successfully, but these errors were encountered: