airjp73 / rvf

Easy form validation and state management for React and Remix
https://rvf-js.io
MIT License
840 stars 66 forks source link

[Bug]: Calling `submit()` from the Form Context does not submit to an `action` #257

Closed ZipBrandon closed 1 year ago

ZipBrandon commented 1 year ago

Which packages are impacted?

What version of these packages are you using?

"remix-validated-form": "4.6.9"

Please provide a link to a minimal reproduction of the issue.

https://codesandbox.io/p/sandbox/throbbing-flower-4gul6q

Steps to Reproduce the Bug or Issue

When a ValidatedForm has an action on it, call submit() from the form's context will not submit the form to the action. It will work with a standard submit button.

Expected behavior

I expect that I would be able to programmatically submit a form and have the corresponding action be targeted.

Screenshots or Videos

No response

Platform

Additional context

No response