remix-validated-form 4.6.7 → 4.6.9
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/dist/index.cjs.js +5 -4
- 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 +2 -2
- package/src/ValidatedForm.tsx +4 -2
- package/src/internal/state/createFormStore.ts +1 -1
- package/stats.html +1 -1
package/dist/index.esm.js
CHANGED
@@ -157,7 +157,7 @@ var hydratable = {
|
|
157
157
|
|
158
158
|
// src/internal/state/createFormStore.ts
|
159
159
|
import invariant2 from "tiny-invariant";
|
160
|
-
import create from "zustand";
|
160
|
+
import { create } from "zustand";
|
161
161
|
import { immer } from "zustand/middleware/immer";
|
162
162
|
|
163
163
|
// src/internal/logic/requestSubmit.ts
|
@@ -1550,6 +1550,7 @@ function ValidatedForm({
|
|
1550
1550
|
const handleSubmit = async (e, target, nativeEvent) => {
|
1551
1551
|
startSubmit();
|
1552
1552
|
const submitter = nativeEvent.submitter;
|
1553
|
+
const formMethod = (submitter == null ? void 0 : submitter.formMethod) || method;
|
1553
1554
|
const formDataToValidate = getDataFromForm(e.currentTarget);
|
1554
1555
|
if (submitter == null ? void 0 : submitter.name) {
|
1555
1556
|
formDataToValidate.append(submitter.name, submitter.value);
|
@@ -1574,11 +1575,11 @@ function ValidatedForm({
|
|
1574
1575
|
return;
|
1575
1576
|
}
|
1576
1577
|
if (fetcher)
|
1577
|
-
fetcher.submit(submitter || e.currentTarget);
|
1578
|
+
fetcher.submit(submitter || e.currentTarget, { 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
|
};
|