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

Form doesn't rerender when going back from dirty state to pristine state #492

Closed
smashercosmo opened this issue May 23, 2019 · 4 comments · Fixed by #495
Closed

Form doesn't rerender when going back from dirty state to pristine state #492

smashercosmo opened this issue May 23, 2019 · 4 comments · Fixed by #495

Comments

@smashercosmo
Copy link

Are you submitting a bug report or a feature request?

bug report

What is the current behavior?

Form doesn't rerender when going back from dirty state to pristine state

What is the expected behavior?

Form should rerender when going back from dirty state to pristine state

Sandbox Link

https://codesandbox.io/s/r9e0k

  1. Change value from 'bla' to some other value
  2. You'll see 'Is pristine: false'
  3. Change value back to 'bla'
  4. You'll see that 'Is pristine' is still false
  5. Click 'get state' button
  6. In the form state in console you'll see that pristine is true

Other information

Works fine in react-final-form@4.1.0

@jsrhodes15
Copy link

FWIW - We are seeing this also. Workaround at the moment is to wrap the thing that needs to know pristine || dirty in a FormSpy. I know this isn't ideal, but it does work.

@erikras
Copy link
Member

erikras commented May 27, 2019

Published fix in v6.0.0.

@smashercosmo
Copy link
Author

Thank you

@lock
Copy link

lock bot commented Jun 24, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants