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

Unsaved changes prompt comes up when saving in SimpleForm #6887

Closed
benthepoet opened this issue Nov 19, 2021 · 2 comments · Fixed by #6895
Closed

Unsaved changes prompt comes up when saving in SimpleForm #6887

benthepoet opened this issue Nov 19, 2021 · 2 comments · Fixed by #6895
Labels

Comments

@benthepoet
Copy link

benthepoet commented Nov 19, 2021

What you were expecting:
The unsaved changes prompt shouldn't appear when trying to save a record using SimpleForm.

What happened instead:
When saving a record using the SimpleForm the unsaved changes prompt appears.

Steps to reproduce:

  • Run the simple project in the examples.
  • Edit the body of a comment.
  • Save the comment.
  • Unsaved changes prompt appears.

Environment

  • React-admin version: 3.19.1
  • Last version that did not exhibit the issue (if applicable): 3.19.0
  • Browser: Brave 1.32.106
@WiXSL
Copy link
Contributor

WiXSL commented Nov 22, 2021

Reproduced. Thanks

@WiXSL WiXSL added the bug label Nov 22, 2021
@WiXSL
Copy link
Contributor

WiXSL commented Nov 22, 2021

@djhi,
If you await more than 100 ms here, the test fails:
await new Promise(resolve => setTimeout(resolve, 101));

// We don't check whether the redirection happened because final-form keeps the form

Never mind, I think I got it fixed

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

Successfully merging a pull request may close this issue.

2 participants