Skip to content

Edit onSuccess prop doesn't work correctly #5819

Closed

Description

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions