@holo-js/forms 0.3.19 → 0.3.20
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.
|
@@ -50,6 +50,7 @@ type ClientSubmitResult<TData, TSuccess = unknown> = FormSubmissionResult<TData>
|
|
|
50
50
|
type BrowserFormElement = {
|
|
51
51
|
readonly action?: string;
|
|
52
52
|
readonly method?: string;
|
|
53
|
+
getAttribute?(name: string): string | null;
|
|
53
54
|
};
|
|
54
55
|
interface UseFormOptions<TData, TSuccess = unknown> {
|
|
55
56
|
readonly action?: string;
|
package/dist/internal/client.mjs
CHANGED
|
@@ -789,7 +789,7 @@ function createFormClient(schemaDefinition, options = {}) {
|
|
|
789
789
|
try {
|
|
790
790
|
const submitter = options.submitter ?? ((context) => defaultSubmitter(context, options));
|
|
791
791
|
const liveForm = browserForm ?? getActiveElementBrowserForm();
|
|
792
|
-
const method = options.method ?? liveForm?.method ?? "POST";
|
|
792
|
+
const method = options.method ?? (liveForm?.getAttribute ? liveForm.getAttribute("method") : liveForm?.method) ?? "POST";
|
|
793
793
|
const action = options.action ?? liveForm?.action;
|
|
794
794
|
const liveFormData = getActiveBrowserFormData(liveForm);
|
|
795
795
|
const formData = liveFormData ?? buildFormData(state.values);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holo-js/forms",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.20",
|
|
4
4
|
"description": "Holo-JS Framework - forms-first validation and submission contracts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"test": "vitest --run"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@holo-js/validation": "^0.3.
|
|
31
|
+
"@holo-js/validation": "^0.3.20"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@holo-js/security": "^0.3.
|
|
34
|
+
"@holo-js/security": "^0.3.20"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"@holo-js/security": {
|