x-ui-design 0.5.81 → 0.5.82
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 +8 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/lib/components/Form/Item/Item.tsx +1 -1
- package/lib/hooks/useForm.ts +8 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -659,6 +659,13 @@ const useForm = (initialValues = {}, onFieldsChange, onValuesChange, scrollToFir
|
|
|
659
659
|
return;
|
|
660
660
|
}
|
|
661
661
|
formRef.current[stepRef.current][name] = value;
|
|
662
|
+
console.log({
|
|
663
|
+
name,
|
|
664
|
+
value,
|
|
665
|
+
errors,
|
|
666
|
+
reset,
|
|
667
|
+
touch
|
|
668
|
+
});
|
|
662
669
|
if (touch) {
|
|
663
670
|
touchedFieldsRef.current.add(name);
|
|
664
671
|
}
|
|
@@ -709,7 +716,6 @@ const useForm = (initialValues = {}, onFieldsChange, onValuesChange, scrollToFir
|
|
|
709
716
|
}
|
|
710
717
|
function isFieldsTouched(nameList, allFieldsTouched = false) {
|
|
711
718
|
if (!nameList) {
|
|
712
|
-
console.info(touchedFieldsRef.current);
|
|
713
719
|
return touchedFieldsRef.current.size > 0;
|
|
714
720
|
}
|
|
715
721
|
return allFieldsTouched ? nameList.every(name => touchedFieldsRef.current.has(name)) : nameList.some(name => touchedFieldsRef.current.has(name));
|
|
@@ -1136,7 +1142,7 @@ const FormItemChildComponent = ({
|
|
|
1136
1142
|
} = formContext || {};
|
|
1137
1143
|
const debouncedSetFieldValue = useRef(debounce((name, value) => {
|
|
1138
1144
|
setFieldValue(name, value, undefined, undefined, true);
|
|
1139
|
-
},
|
|
1145
|
+
}, 20)).current;
|
|
1140
1146
|
const handleChange = (e, option) => {
|
|
1141
1147
|
let rawValue = e?.target ? e.target.value : e;
|
|
1142
1148
|
if (normalize) {
|