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
Add support for reloadDocument prop #286
base: main
Are you sure you want to change the base?
Add support for reloadDocument prop #286
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
); | ||
}} | ||
onSubmit={ | ||
reloadDocument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As-is, this is going to skip all validations, which I'm not sure is desirable. Shouldn't we validate, then submit the form via a full page reload? Not sure off the top of my head how to handle that situation when there's a submitter
other than the form though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s a good point. I was going after this with the thought process that if you wanted a full page reload you would be okay with the server handling validation, like when JS isn’t running clientside. I can see how that’s not a super desirable solution though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just hit this "bug" while upgrading from Remix 1.8, to 1.19.0.
Seems like something changed in the framework (probably when it was rewritten on top of react-router), that my use case fail:
<ValidatedForm reloadDocument>
on a regular route, posting to a resource route that generates and download a PDF.
Used patch-package
to implement this PR approach, but would definitely love something that keeps client-side validation.
Anything I can do to help this PR move forward?
Is there anything I can help you with to get this out faster? |
This fell off my radar as things have gotten busy for me. I don't really have the time to work on a fix at the moment, anyone who does can feel free to pick it up. |
Fixes #241