Please do not submit support requests or "How to" questions here. For that, go to StackOverflow.
What you were expecting:
After visiting a custom edit view of a resource, I try to create an entity of another resource.
What happened instead:
I get an error message. The creation doesn't work as there is extraneous information in the payload related to the first resource.
Steps to reproduce:
Prerequisites:
Steps:
To be more precise, the payload of your POST request still has the lastName value of the previous resource, which results in an error.
Other information:
I investigated a bit and this seems to be due to redux-form behaviour, espacially this issue: https://github.com/erikras/redux-form/issues/2761. In short values are not removed from state when a field is not registered.
Environment
Thanks in advance for your help !
This has been fixed in https://github.com/marmelab/react-admin/releases/tag/v2.2.3. Can you confirm the version you are using ?
I upgraded my react-admin version and indeed it is solved :smile: Thank you !
Most helpful comment
I upgraded my react-admin version and indeed it is solved :smile: Thank you !