-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected navigation can occur with Remix useFetcher and resetForm: true #730
Comments
Thanks for the codesandbox! I can reproduce the issue without Conform here. Here is what happened: Conform manages all uncontrolled inputs through a It's hard to tell what's really went wrong here because we are indeed abusing the keys right now 😅 Luckily, we are getting rid of the keys soon! I am planning to get #729 released in |
This is now working properly with v1.2.1. Thanks again! |
Awesome, thanks for the update! |
Describe the bug and the expected behavior
I've noticed some funny interplay between using Remix's useFetcher and conform's resetForm option, specifically when the useFetcher hits an action from another route. I've created a sandbox that shows this issue here:
https://codesandbox.io/p/devbox/interesting-hamilton-xt5pwn
Specifically, if the user fills out a name and hits enter to submit the form, they're brought to the JSON response that the action returns. Interestingly, if the user clicks the submit button, the form works as expected.
Conform version
1.1.5
Steps to Reproduce the Bug or Issue
https://codesandbox.io/p/devbox/interesting-hamilton-xt5pwn
Alternatively, create a basic Remix app with zod, @conform-to/react, and @conform-to/zod installed.
Update
routes/index.tsx
Create
routes/create-user.tsx
What browsers are you seeing the problem on?
Chrome
Screenshots or Videos
No response
Additional context
I suppose it's possible this is a Remix issue, but seems to specifically happen when the
submission.response({ resetForm: true })
option is configured.The text was updated successfully, but these errors were encountered: