Closed haines closed 1 month ago
remix-validated-form
@remix-validated-form/with-zod
@remix-validated-form/with-yup
zod-form-data
https://codesandbox.io/p/devbox/vigilant-banach-dy5vkk
We have a validated form in a modal with an onSubmit callback that calls event.preventDefault() and unmounts the modal component.
onSubmit
event.preventDefault()
This causes an unhandled error "Cannot set properties of undefined (setting 'isSubmitting')".
Unmounting the form on submission doesn't cause an error.
https://github.com/airjp73/remix-validated-form/assets/785641/b8ee3e3d-a991-4e2c-b232-69360be6b5b3
No response
+1 on this, we've run into the same issue
RVF v6 has been released 🎉
This issue no longer exists in v6. If it's still a problem in that version, please feel free to open a new issue.
You can find the documentation here and the migration guide here.
Which packages are impacted?
remix-validated-form
@remix-validated-form/with-zod
@remix-validated-form/with-yup
zod-form-data
What version of these packages are you using?
remix-validated-form
: 5.1.5Please provide a link to a minimal reproduction of the issue.
https://codesandbox.io/p/devbox/vigilant-banach-dy5vkk
Steps to Reproduce the Bug or Issue
We have a validated form in a modal with an
onSubmit
callback that callsevent.preventDefault()
and unmounts the modal component.This causes an unhandled error "Cannot set properties of undefined (setting 'isSubmitting')".
Expected behavior
Unmounting the form on submission doesn't cause an error.
Screenshots or Videos
https://github.com/airjp73/remix-validated-form/assets/785641/b8ee3e3d-a991-4e2c-b232-69360be6b5b3
Platform
Additional context
No response