remix-validated-form 4.6.8 → 4.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +18 -17
- package/.turbo/turbo-typecheck.log +0 -13
- package/dist/index.cjs.js +4 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/ValidatedForm.tsx +4 -3
package/dist/index.esm.js
CHANGED
@@ -1550,7 +1550,8 @@ function ValidatedForm({
|
|
1550
1550
|
const handleSubmit = async (e, target, nativeEvent) => {
|
1551
1551
|
startSubmit();
|
1552
1552
|
const submitter = nativeEvent.submitter;
|
1553
|
-
const
|
1553
|
+
const formMethod = (submitter == null ? void 0 : submitter.formMethod) || method;
|
1554
|
+
const formDataToValidate = getDataFromForm(target);
|
1554
1555
|
if (submitter == null ? void 0 : submitter.name) {
|
1555
1556
|
formDataToValidate.append(submitter.name, submitter.value);
|
1556
1557
|
}
|
@@ -1574,11 +1575,11 @@ function ValidatedForm({
|
|
1574
1575
|
return;
|
1575
1576
|
}
|
1576
1577
|
if (fetcher)
|
1577
|
-
fetcher.submit(submitter ||
|
1578
|
+
fetcher.submit(submitter || target, { method: formMethod });
|
1578
1579
|
else
|
1579
1580
|
submit(submitter || target, {
|
1580
1581
|
replace: replace2,
|
1581
|
-
method:
|
1582
|
+
method: formMethod
|
1582
1583
|
});
|
1583
1584
|
}
|
1584
1585
|
};
|