remix-validated-form 2.1.0 → 2.1.1
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 +2 -2
- package/README.md +3 -6
- package/browser/ValidatedForm.js +1 -1
- package/build/ValidatedForm.js +1 -1
- package/package.json +1 -1
- package/src/ValidatedForm.tsx +3 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
[2K[1G[2m$ npm run build:browser && npm run build:main[22m
|
2
2
|
|
3
|
-
> remix-validated-form@2.
|
3
|
+
> remix-validated-form@2.1.0 build:browser
|
4
4
|
> tsc --module ESNext --outDir ./browser
|
5
5
|
|
6
6
|
|
7
|
-
> remix-validated-form@2.
|
7
|
+
> remix-validated-form@2.1.0 build:main
|
8
8
|
> tsc --module CommonJS --outDir ./build
|
9
9
|
|
package/README.md
CHANGED
@@ -18,12 +18,9 @@ To run `sample-app`:
|
|
18
18
|
|
19
19
|
```
|
20
20
|
git clone https://github.com/airjp73/remix-validated-form
|
21
|
-
cd remix-validated-form
|
22
|
-
|
23
|
-
|
24
|
-
npm i
|
25
|
-
cd ..
|
26
|
-
npm run sample-app
|
21
|
+
cd ./remix-validated-form
|
22
|
+
yarn install
|
23
|
+
yarn sample-app
|
27
24
|
```
|
28
25
|
|
29
26
|
# Getting started
|
package/browser/ValidatedForm.js
CHANGED
@@ -121,5 +121,5 @@ export function ValidatedForm({ validator, onSubmit, children, fetcher, action,
|
|
121
121
|
if (event.defaultPrevented)
|
122
122
|
return;
|
123
123
|
setFieldErrors({});
|
124
|
-
}, children: _jsxs(FormContext.Provider, { value: contextValue, children: [_jsx("input", { type: "hidden", value: subaction, name: "subaction" }, void 0), children] }, void 0) }, void 0));
|
124
|
+
}, children: _jsxs(FormContext.Provider, { value: contextValue, children: [subaction && (_jsx("input", { type: "hidden", value: subaction, name: "subaction" }, void 0)), children] }, void 0) }, void 0));
|
125
125
|
}
|
package/build/ValidatedForm.js
CHANGED
@@ -127,6 +127,6 @@ function ValidatedForm({ validator, onSubmit, children, fetcher, action, default
|
|
127
127
|
if (event.defaultPrevented)
|
128
128
|
return;
|
129
129
|
setFieldErrors({});
|
130
|
-
}, children: (0, jsx_runtime_1.jsxs)(formContext_1.FormContext.Provider, { value: contextValue, children: [(0, jsx_runtime_1.jsx)("input", { type: "hidden", value: subaction, name: "subaction" }, void 0), children] }, void 0) }, void 0));
|
130
|
+
}, children: (0, jsx_runtime_1.jsxs)(formContext_1.FormContext.Provider, { value: contextValue, children: [subaction && ((0, jsx_runtime_1.jsx)("input", { type: "hidden", value: subaction, name: "subaction" }, void 0)), children] }, void 0) }, void 0));
|
131
131
|
}
|
132
132
|
exports.ValidatedForm = ValidatedForm;
|
package/package.json
CHANGED
package/src/ValidatedForm.tsx
CHANGED
@@ -219,7 +219,9 @@ export function ValidatedForm<DataType>({
|
|
219
219
|
}}
|
220
220
|
>
|
221
221
|
<FormContext.Provider value={contextValue}>
|
222
|
-
|
222
|
+
{subaction && (
|
223
|
+
<input type="hidden" value={subaction} name="subaction" />
|
224
|
+
)}
|
223
225
|
{children}
|
224
226
|
</FormContext.Provider>
|
225
227
|
</Form>
|