@worknice/whiteboard 0.22.1 → 0.22.2
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/dist/forms/useForm.js +1 -5
- package/package.json +2 -2
package/dist/forms/useForm.js
CHANGED
|
@@ -17,9 +17,6 @@ const useForm = ({ initialValues, onSubmit, onSuccess, validators })=>{
|
|
|
17
17
|
setErrors(flatValidationErrors);
|
|
18
18
|
setStatus("errored");
|
|
19
19
|
await sleep(1000, ()=>setStatus("modified"));
|
|
20
|
-
} else if ("fresh" === status) {
|
|
21
|
-
setStatus("success");
|
|
22
|
-
if (onSuccess) await onSuccess(void 0);
|
|
23
20
|
} else try {
|
|
24
21
|
const result = await onSubmit(data);
|
|
25
22
|
setStatus("success");
|
|
@@ -46,8 +43,7 @@ const useForm = ({ initialValues, onSubmit, onSuccess, validators })=>{
|
|
|
46
43
|
onSubmit,
|
|
47
44
|
onSuccess,
|
|
48
45
|
sleep,
|
|
49
|
-
validators
|
|
50
|
-
status
|
|
46
|
+
validators
|
|
51
47
|
]);
|
|
52
48
|
const fieldErrors = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>Object.fromEntries(Object.keys(initialValues).map((key)=>[
|
|
53
49
|
key,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worknice/whiteboard",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.22.
|
|
4
|
+
"version": "0.22.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-markdown": "^10.1.0",
|
|
39
39
|
"utf8": "^3.0.0",
|
|
40
40
|
"zod": "^3.22.3",
|
|
41
|
-
"@worknice/utils": "^0.6.
|
|
41
|
+
"@worknice/utils": "^0.6.87"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@anolilab/semantic-release-pnpm": "^1.1.10",
|