@sheinx/hooks 3.5.2-beta.7 → 3.5.2-beta.8
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/use-form/use-form-control/use-form-control.d.ts.map +1 -1
- package/cjs/components/use-form/use-form-control/use-form-control.js +6 -0
- package/esm/components/use-form/use-form-control/use-form-control.d.ts.map +1 -1
- package/esm/components/use-form/use-form-control/use-form-control.js +6 -0
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-form-control.d.ts","sourceRoot":"","sources":["use-form-control.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAyB/D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;;
|
1
|
+
{"version":3,"file":"use-form-control.d.ts","sourceRoot":"","sources":["use-form-control.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAyB/D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;;kBAyJpC,CAAC,YAAY,GAAG,EAAE;;;;;EAkDrD"}
|
@@ -115,6 +115,9 @@ function useFormControl(props) {
|
|
115
115
|
}
|
116
116
|
});
|
117
117
|
setValueState(nextValue);
|
118
|
+
formFunc === null || formFunc === void 0 || formFunc.setValue(_defineProperty({}, name, nextValue), {
|
119
|
+
validate: false
|
120
|
+
});
|
118
121
|
} else {
|
119
122
|
var _value2 = getValue(name, formValue);
|
120
123
|
var _error2 = getError(name, errors, severErrors);
|
@@ -124,6 +127,9 @@ function useFormControl(props) {
|
|
124
127
|
if (!(0, _shallowEqual.shallowEqual)(_value2, latestInfo.valueState)) {
|
125
128
|
if (_value2 === undefined && defaultValue !== undefined) {
|
126
129
|
setValueState(defaultValue);
|
130
|
+
formFunc === null || formFunc === void 0 || formFunc.setValue(_defineProperty({}, name, defaultValue), {
|
131
|
+
validate: false
|
132
|
+
});
|
127
133
|
} else {
|
128
134
|
setValueState(_value2);
|
129
135
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-form-control.d.ts","sourceRoot":"","sources":["use-form-control.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAyB/D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;;
|
1
|
+
{"version":3,"file":"use-form-control.d.ts","sourceRoot":"","sources":["use-form-control.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAyB/D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;;kBAyJpC,CAAC,YAAY,GAAG,EAAE;;;;;EAkDrD"}
|
@@ -106,6 +106,9 @@ export default function useFormControl(props) {
|
|
106
106
|
}
|
107
107
|
});
|
108
108
|
setValueState(nextValue);
|
109
|
+
formFunc === null || formFunc === void 0 || formFunc.setValue(_defineProperty({}, name, nextValue), {
|
110
|
+
validate: false
|
111
|
+
});
|
109
112
|
} else {
|
110
113
|
var _value2 = getValue(name, formValue);
|
111
114
|
var _error2 = getError(name, errors, severErrors);
|
@@ -115,6 +118,9 @@ export default function useFormControl(props) {
|
|
115
118
|
if (!shallowEqual(_value2, latestInfo.valueState)) {
|
116
119
|
if (_value2 === undefined && defaultValue !== undefined) {
|
117
120
|
setValueState(defaultValue);
|
121
|
+
formFunc === null || formFunc === void 0 || formFunc.setValue(_defineProperty({}, name, defaultValue), {
|
122
|
+
validate: false
|
123
|
+
});
|
118
124
|
} else {
|
119
125
|
setValueState(_value2);
|
120
126
|
}
|