Skip to content
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: preserve search params on unspecified <Form> action #9060

Merged
merged 7 commits into from
Aug 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'dev' into brophdawg11/form-action-params
brophdawg11 committed Jul 22, 2022
commit 3310ee4aa86492a2796043d83eb78aa67d2a1580
2 changes: 1 addition & 1 deletion packages/react-router-dom/index.tsx
Original file line number Diff line number Diff line change
@@ -852,7 +852,7 @@ function useSubmitImpl(fetcherKey?: string, routeId?: string): SubmitFunction {
}

export function useFormAction(action?: string): string {
let routeContext = React.useContext(UNSAFE_RouteContext);
let routeContext = React.useContext(RouteContext);
invariant(routeContext, "useFormAction must be used inside a RouteContext");

let location = useLocation();
You are viewing a condensed version of this merge commit. You can view the full changes here.