-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(remix-react): submit
<Form>
w/method set by submitter formmethod
Fix `<Form>` component by not passing the form's `method` into the `options` when calling the `submit(target, options)` function (created with the `useSubmit()` hook). This ensures that the option does not take precedence on any `formethod` set on the submitter which otherwise break the `formmethod` functionality. Since #3094 and #3094 the `<Form>` passes the "submitter" (if any) as the `target` to the `submit(target, options)` (`useSubmitImpl`) which will attempt to read the `formmethod`, `formaction` and `formenctype` attributes on the target. Therefore, the responsability to infer which method should be used should solely be on `useSubmitImpl` for the given `target`. Co-authored-by: Maxime Doury <[email protected]>
- Loading branch information
Showing
3 changed files
with
73 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters