FormProps
interface FormProps extends [React.FormHTMLAttributes]<HTMLFormElement> {
action?: string;
encType?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
method?: HTMLFormMethod;
onSubmit?: React.FormEventHandler<HTMLFormElement>;
preventScrollReset?: boolean;
relative?: RelativeRoutingType;
reloadDocument?: boolean;
replace?: boolean;
}§Properties
§
encType?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"
[src]<form encType>
- enhancing beyond the normal string type and limiting
to the built-in browser supported values
§
method?: HTMLFormMethod
[src]The HTTP verb to use when the form is submit. Supports "get", "post", "put", "delete", "patch".
§
onSubmit?: React.FormEventHandler<HTMLFormElement>
[src]A function to call when the form is submitted. If you call
event.preventDefault()
then this form will not do anything.
§
preventScrollReset?: boolean
[src]Prevent the scroll position from resetting to the top of the viewport on completion of the navigation when using the component
§
relative?: RelativeRoutingType
[src]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 hierarchy and want to instead route based on /-delimited URL segments