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(remix-react): fix fetcher.formEncType #6810

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/chatty-pears-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/react": patch
---

Changed the type of formEncType on useFetcher and useFetchers to be FormEncType from react-router-dom instead of strings
brophdawg11 marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -556,3 +556,4 @@
- tanerijun
- toufiqnuur
- ally1002
- AlemTuzlak
10 changes: 5 additions & 5 deletions packages/remix-react/transition.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Location } from "react-router-dom";
import type { Location, FormEncType } from "react-router-dom";

export interface Submission {
action: string;
Expand Down Expand Up @@ -137,7 +137,7 @@ export type FetcherStates<TData = any> = {
type: "actionSubmission";
formMethod: FetcherActionSubmission["method"];
formAction: string;
formEncType: string;
formEncType: FormEncType;
submission: FetcherActionSubmission;
data: TData | undefined;
} & FetcherSubmissionDataTypes;
Expand All @@ -146,7 +146,7 @@ export type FetcherStates<TData = any> = {
type: "loaderSubmission";
formMethod: FetcherLoaderSubmission["method"];
formAction: string;
formEncType: string;
formEncType: FormEncType;
submission: FetcherLoaderSubmission;
data: TData | undefined;
} & FetcherSubmissionDataTypes;
Expand All @@ -155,7 +155,7 @@ export type FetcherStates<TData = any> = {
type: "actionReload";
formMethod: FetcherActionSubmission["method"];
formAction: string;
formEncType: string;
formEncType: FormEncType;
submission: FetcherActionSubmission;
data: TData;
} & FetcherSubmissionDataTypes;
Expand All @@ -164,7 +164,7 @@ export type FetcherStates<TData = any> = {
type: "actionRedirect";
formMethod: FetcherActionSubmission["method"];
formAction: string;
formEncType: string;
formEncType: FormEncType;
submission: FetcherActionSubmission;
data: undefined;
} & FetcherSubmissionDataTypes;
Expand Down