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
The sandbox has two different versions that do the same thing. RVF w/ onSubmit added to the Form; and one without onSubmit added to the form.
Click one of the links on the main index page to see. Clicking SUBMIT on the RVF w/ onSubmit won't do the view transition. The nav links will work on the page. RVF w/o onSubmit works as expected performing the basic crossfrade view transition.
Expected behavior
I would expect viewTransitions to work when using RVF and it's submit handler.
Screenshots or Videos
No response
Platform
MacOS, Chrome
Additional context
No response
The text was updated successfully, but these errors were encountered:
Good callout. I didn't even realize this was a thing now lol. Looks like this should be pretty straightforward to fix. Would you have time to submit a PR for it?
I think it's just a matter of updating the type here and pass through the viewTransition param here.
Your PR does appear to have fixed the issue. We'll need to document this, but in order for it to work you need to pass viewTransition: true to the useForm hook rather than the Form component. Since under the hood we use useSubmit rather than the Form component from react-router. It's currently published as 7.0.2-beta.0 until we have documentation (which I could add tomorrow).
Thanks for checking that out. I was building my fork and copying the dist over my @rvf/react-router dist directory. I have no idea why I didn't see my changes work in my scrappy test, but the beta package does in fact work. Thanks again!
Which packages are impacted?
@rvf/react
@rvf/react-router
@rvf/zod
@rvf/yup
zod-form-data
What version of these packages are you using?
Please provide a link to a minimal reproduction of the issue.
https://stackblitz.com/edit/github-uwgzmhjv
Steps to Reproduce the Bug or Issue
Expected behavior
I would expect viewTransitions to work when using RVF and it's submit handler.
Screenshots or Videos
No response
Platform
MacOS, Chrome
Additional context
No response
The text was updated successfully, but these errors were encountered: