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
Question/Feature Request: Accessing the submitter element (button)
Hello. Sorry if this is specified on the docs or other issue, I wasn't able to find it by looking for 'submitter' or 'submit', etc. Is there a way to access the submitter element from the onSubmit function?. For example:
In the case of having multiple submit buttons for different actions with the same form state:
It doesn't seem ideal, is the event available to the Form's parent element via any callback or form state? Can I modify the callback to include it? How could someone go about supporting multiple submit options? Haven't been able to find info. about it in the docs.
Thank you, very good library :)
The text was updated successfully, but these errors were encountered:
It seems like this is the react-hook-form issue, I found this interesting article about resolving this kind of issue.
Check this out! https://stackoverflow.com/a/69025391
Question/Feature Request: Accessing the submitter element (button)
Hello. Sorry if this is specified on the docs or other issue, I wasn't able to find it by looking for 'submitter' or 'submit', etc. Is there a way to access the submitter element from the onSubmit function?. For example:
In the case of having multiple submit buttons for different actions with the same form state:
The current way to get the event data is to store outside of the form component
And then the parent component can use the submitter value:
It doesn't seem ideal, is the event available to the Form's parent element via any callback or form state? Can I modify the callback to include it? How could someone go about supporting multiple submit options? Haven't been able to find info. about it in the docs.
Thank you, very good library :)
The text was updated successfully, but these errors were encountered: