Skip to content

Commit

Permalink
Fixed fetcher formEncType in @remix-run/react exports
Browse files Browse the repository at this point in the history
  • Loading branch information
AlemTuzlak committed Jul 11, 2023
1 parent 8ac053a commit 31259f9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
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
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

0 comments on commit 31259f9

Please sign in to comment.