Skip to content
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

Edit onSuccess prop doesn't work correctly #5819

Closed
wmwart opened this issue Jan 27, 2021 · 1 comment · Fixed by #5851
Closed

Edit onSuccess prop doesn't work correctly #5819

wmwart opened this issue Jan 27, 2021 · 1 comment · Fixed by #5851
Assignees
Labels

Comments

@wmwart
Copy link

wmwart commented Jan 27, 2021

What you were expecting:
Expected to work as stated in the documentation

The onSuccess function receives the response from the dataProvider call (dataProvider.create() or dataProvider.update()), which is the created/edited record (see the dataProvider documentation for details)

What happened instead:
Instead, onSuccess is called immediately after Save action , and the data parameter is empty

Steps to reproduce:
Copy the code from the documentation and apply

https://codesandbox.io/s/proud-water-10dbo?file=/src/posts/PostEdit.js
after adding code from documentation codeandbox hangs on save

  • React-admin version:3.11.4
@djhi
Copy link
Collaborator

djhi commented Jan 28, 2021

Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants