You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the new or updated feature that you are suggesting?
I would like to have an onFormChange handler that is aware of all fields in the form. Currently there is no way to do this if you make use of custom components as they don't emit onChange events.
<ValidatedForm onFormChange={form => {
// can access the same values as the useFormContext hook
}}>
...
</ValidatedForm>
Why should this feature be included?
It makes it possible to do some things that aren't currently possible (ergonomically). In my case I want to submit the form every time it changes.
The text was updated successfully, but these errors were encountered:
This seems reasonable. I think just having a useFormChange hook is probably enough for a first pass. My thinking is we would listen to any regular change event or change to a controlled field and invoke the handler with the entire FormData object. I'm not sure when I'll have time to get around to this, but I'm happy to provide guidance if you want try making a PR for this.
I really support this idea, for example I have a 'save' button and it would be reasonable for the button to be disabled if it is the same as the previous saved value. @airjp73 Is there a workaround currently for this?
What is the new or updated feature that you are suggesting?
I would like to have an onFormChange handler that is aware of all fields in the form. Currently there is no way to do this if you make use of custom components as they don't emit onChange events.
Why should this feature be included?
It makes it possible to do some things that aren't currently possible (ergonomically). In my case I want to submit the form every time it changes.
The text was updated successfully, but these errors were encountered: