-
-
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
CREATE type data request returns params instead of response #2087
Comments
This is somewhat intentional - it allows to make as few assumptions as possible about the server response format. I understand your request, but I'm afraid it would be a BC break for the Any thoughts? |
In that case I would make it clear in the docs. Yesterday I had a rough day identifying where the problem was coming from. Especially considering the other data requests behave differently in that regard. Thank you for the clarification |
At least in aor-feathers-client we add this change on version 2.x (react-admin support). |
Marking this as an enhancement to make on the documentation of the |
Fixed by #2262 |
What you were expecting:
The dataProvider CREATE type data request to return created data from the server.
What happened instead:
It returns the params you pass to it instead. If your backend adds data to the record, you are unable to access that data unless you fetch the record again.
I'm not sure if this is intended.
Related code:
https://github.com/marmelab/react-admin/blob/master/packages/ra-data-json-server/src/index.js#L123
https://github.com/marmelab/react-admin/blob/master/packages/ra-data-simple-rest/src/index.js#L127
The text was updated successfully, but these errors were encountered: