x-ui-design 0.5.12 → 0.5.13
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/index.esm.js +1 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -6
- package/dist/index.js.map +1 -1
- package/lib/hooks/useForm.ts +2 -7
- package/package.json +1 -1
package/lib/hooks/useForm.ts
CHANGED
|
@@ -200,13 +200,6 @@ const useForm = (
|
|
|
200
200
|
const fieldErrors: string[] = [];
|
|
201
201
|
const fieldWarnings: string[] = [];
|
|
202
202
|
|
|
203
|
-
console.log({
|
|
204
|
-
name,
|
|
205
|
-
value,
|
|
206
|
-
stepRef: JSON.parse(JSON.stringify(stepRef.current)),
|
|
207
|
-
formRef: JSON.parse(JSON.stringify(formRef.current))
|
|
208
|
-
});
|
|
209
|
-
|
|
210
203
|
await Promise.all(
|
|
211
204
|
[rules].flat(1).map(async (rule: RuleTypes) => {
|
|
212
205
|
rule = typeof rule === 'function' ? rule(formInstance) : rule;
|
|
@@ -270,6 +263,8 @@ const useForm = (
|
|
|
270
263
|
})
|
|
271
264
|
);
|
|
272
265
|
|
|
266
|
+
console.log(fieldErrors);
|
|
267
|
+
|
|
273
268
|
setErrors(prev => ({ ...prev, [name]: fieldErrors }));
|
|
274
269
|
warningsRef.current[name] = fieldWarnings;
|
|
275
270
|
|