Replies: 1 comment 4 replies
-
I think you can use |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a common flow for good form UX:
isDirty
becomes true), the SUBMIT button should be enabledWhat is the simplest way to implement this in RHF?
I started this code sandbox and I'm trying to disable the SUBMIT button like this:
The problem is
isDirty
stays true even after the form submits. I think that's incorrect, because the fields are no longer dirty because they have been submitted/saved to an API endpoint.Disabling the SUBMIT button if
isSubmitted
is true doesn't help after the user submits the form and changes one field again. In that caseisSubmitted
will betrue
, but the button should be enabled.Beta Was this translation helpful? Give feedback.
All reactions