* Form props shared by navigations and fetchers
| 1743 | * Form props shared by navigations and fetchers |
| 1744 | */ |
| 1745 | interface SharedFormProps extends React.FormHTMLAttributes<HTMLFormElement> { |
| 1746 | /** |
| 1747 | * The HTTP verb to use when the form is submitted. Supports `"delete"`, |
| 1748 | * `"get"`, `"patch"`, `"post"`, and `"put"`. |
| 1749 | * |
| 1750 | * Native [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) |
| 1751 | * only supports `"get"` and `"post"`, avoid the other verbs if you'd like to |
| 1752 | * support progressive enhancement |
| 1753 | */ |
| 1754 | method?: HTMLFormMethod; |
| 1755 | |
| 1756 | /** |
| 1757 | * The encoding type to use for the form submission. |
| 1758 | * |
| 1759 | * ```tsx |
| 1760 | * <Form encType="application/x-www-form-urlencoded"/> // Default |
| 1761 | * <Form encType="multipart/form-data"/> |
| 1762 | * <Form encType="text/plain"/> |
| 1763 | * ``` |
| 1764 | */ |
| 1765 | encType?: |
| 1766 | | "application/x-www-form-urlencoded" |
| 1767 | | "multipart/form-data" |
| 1768 | | "text/plain"; |
| 1769 | |
| 1770 | /** |
| 1771 | * The URL to submit the form data to. If `undefined`, this defaults to the |
| 1772 | * closest route in context. |
| 1773 | */ |
| 1774 | action?: string; |
| 1775 | |
| 1776 | /** |
| 1777 | * Determines whether the form action is relative to the route hierarchy or |
| 1778 | * the pathname. Use this if you want to opt out of navigating the route |
| 1779 | * hierarchy and want to instead route based on slash-delimited URL segments. |
| 1780 | * See {@link RelativeRoutingType}. |
| 1781 | */ |
| 1782 | relative?: RelativeRoutingType; |
| 1783 | |
| 1784 | /** |
| 1785 | * Prevent the scroll position from resetting to the top of the viewport on |
| 1786 | * completion of the navigation when using the |
| 1787 | * {@link ScrollRestoration | `<ScrollRestoration>`} component |
| 1788 | */ |
| 1789 | preventScrollReset?: boolean; |
| 1790 | |
| 1791 | /** |
| 1792 | * Specify the default revalidation behavior after this submission |
| 1793 | * |
| 1794 | * If no `shouldRevalidate` functions are present on the active routes, then this |
| 1795 | * value will be used directly. Otherwise it will be passed into `shouldRevalidate` |
| 1796 | * so the route can make the final determination on revalidation. This can be |
| 1797 | * useful when updating search params and you don't want to trigger a revalidation. |
| 1798 | * |
| 1799 | * By default (when not specified), loaders will revalidate according to the routers |
| 1800 | * standard revalidation behavior. |
| 1801 | */ |
| 1802 | defaultShouldRevalidate?: boolean; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…