-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix(remix-react): Preserve search string in form action when action
prop is omitted
#3697
Conversation
🦋 Changeset detectedLatest commit: 9147639 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
action
prop is omittedaction
prop is omitted
The docs are wrong then 🙈. If Preserving search params seems like the right thing to do, but I'm trying to think about the symmetry here: Default Browser/HTML Behavior
https://rv02u9.csb.app/foo/?bar#baz So:
What The new concept with nested routes is that The problem seems to be that we are defaulting The changes on this PR treat
I expect the change to be pretty simple.
|
Co-authored-by: Ionut Botizan <ionut.botizan@haufe-lexware.com>
b44e5c3
to
f6ddd78
Compare
… prop is omitted (#3697) Co-authored-by: Ionut Botizan <ionut.botizan@haufe-lexware.com> Co-authored-by: Javier Castro <javier.alejandro.castro@gmail.com>
When a
Form
action is omitted, the default value is"."
which resolves to the current route without search params. This is intended behavior when"."
is passed touseResolvedPath
, but Remix docs specify that when an action is omitted that the default action is the current location. Users would expect that to include the search string.Closes: #927
Closes: #931
Testing Strategy:
Added tests to the existing form integration test file.