[Bug]: Unhandled error setting isSubmitting
after form unmounts
#355
Labels
bug
Something isn't working
isSubmitting
after form unmounts
#355
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
Screen.Recording.2024-03-28.at.13.52.41.mov
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: