New source found from dndbeyond.com
This commit is contained in:
+39
-26
@@ -150,7 +150,10 @@ function isFormDataSubmitterSupported() {
|
||||
return _formDataSupportsSubmitter;
|
||||
}
|
||||
|
||||
export interface SubmitOptions {
|
||||
/**
|
||||
* Submit options shared by both navigations and fetchers
|
||||
*/
|
||||
interface SharedSubmitOptions {
|
||||
/**
|
||||
* The HTTP method used to submit the form. Overrides `<form method>`.
|
||||
* Defaults to "GET".
|
||||
@@ -169,28 +172,6 @@ export interface SubmitOptions {
|
||||
*/
|
||||
encType?: FormEncType;
|
||||
|
||||
/**
|
||||
* Indicate a specific fetcherKey to use when using navigate=false
|
||||
*/
|
||||
fetcherKey?: string;
|
||||
|
||||
/**
|
||||
* navigate=false will use a fetcher instead of a navigation
|
||||
*/
|
||||
navigate?: boolean;
|
||||
|
||||
/**
|
||||
* Set `true` to replace the current entry in the browser's history stack
|
||||
* instead of creating a new one (i.e. stay on "the same page"). Defaults
|
||||
* to `false`.
|
||||
*/
|
||||
replace?: boolean;
|
||||
|
||||
/**
|
||||
* State object to add to the history stack entry for this navigation
|
||||
*/
|
||||
state?: any;
|
||||
|
||||
/**
|
||||
* Determines whether the form action is relative to the route hierarchy or
|
||||
* the pathname. Use this if you want to opt out of navigating the route
|
||||
@@ -205,14 +186,46 @@ export interface SubmitOptions {
|
||||
preventScrollReset?: boolean;
|
||||
|
||||
/**
|
||||
* Enable flushSync for this navigation's state updates
|
||||
* Enable flushSync for this submission's state updates
|
||||
*/
|
||||
unstable_flushSync?: boolean;
|
||||
flushSync?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit options available to fetchers
|
||||
*/
|
||||
export interface FetcherSubmitOptions extends SharedSubmitOptions {}
|
||||
|
||||
/**
|
||||
* Submit options available to navigations
|
||||
*/
|
||||
export interface SubmitOptions extends FetcherSubmitOptions {
|
||||
/**
|
||||
* Set `true` to replace the current entry in the browser's history stack
|
||||
* instead of creating a new one (i.e. stay on "the same page"). Defaults
|
||||
* to `false`.
|
||||
*/
|
||||
replace?: boolean;
|
||||
|
||||
/**
|
||||
* State object to add to the history stack entry for this navigation
|
||||
*/
|
||||
state?: any;
|
||||
|
||||
/**
|
||||
* Indicate a specific fetcherKey to use when using navigate=false
|
||||
*/
|
||||
fetcherKey?: string;
|
||||
|
||||
/**
|
||||
* navigate=false will use a fetcher instead of a navigation
|
||||
*/
|
||||
navigate?: boolean;
|
||||
|
||||
/**
|
||||
* Enable view transitions on this submission navigation
|
||||
*/
|
||||
unstable_viewTransition?: boolean;
|
||||
viewTransition?: boolean;
|
||||
}
|
||||
|
||||
const supportedFormEncTypes: Set<FormEncType> = new Set([
|
||||
|
||||
Reference in New Issue
Block a user