remix-validated-form 4.6.9 → 4.6.11
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 -18
- package/dist/index.cjs.js +5 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/ValidatedForm.tsx +2 -3
- package/src/internal/hooks.ts +4 -1
package/dist/index.esm.js
CHANGED
@@ -1030,7 +1030,9 @@ var useDefaultValuesFromLoader = ({
|
|
1030
1030
|
const matches = useMatches();
|
1031
1031
|
if (typeof formId === "string") {
|
1032
1032
|
const dataKey = formDefaultValuesKey(formId);
|
1033
|
-
const match = matches.reverse().find(
|
1033
|
+
const match = matches.reverse().find(
|
1034
|
+
(match2) => match2.data && typeof match2.data === "object" && dataKey in match2.data
|
1035
|
+
);
|
1034
1036
|
return match == null ? void 0 : match.data[dataKey];
|
1035
1037
|
}
|
1036
1038
|
return null;
|
@@ -1551,7 +1553,7 @@ function ValidatedForm({
|
|
1551
1553
|
startSubmit();
|
1552
1554
|
const submitter = nativeEvent.submitter;
|
1553
1555
|
const formMethod = (submitter == null ? void 0 : submitter.formMethod) || method;
|
1554
|
-
const formDataToValidate = getDataFromForm(
|
1556
|
+
const formDataToValidate = getDataFromForm(target);
|
1555
1557
|
if (submitter == null ? void 0 : submitter.name) {
|
1556
1558
|
formDataToValidate.append(submitter.name, submitter.value);
|
1557
1559
|
}
|
@@ -1575,7 +1577,7 @@ function ValidatedForm({
|
|
1575
1577
|
return;
|
1576
1578
|
}
|
1577
1579
|
if (fetcher)
|
1578
|
-
fetcher.submit(submitter ||
|
1580
|
+
fetcher.submit(submitter || target, { method: formMethod });
|
1579
1581
|
else
|
1580
1582
|
submit(submitter || target, {
|
1581
1583
|
replace: replace2,
|