@sheinx/hooks 3.5.2-beta.7 → 3.5.2-beta.8

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.
@@ -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;;kBAuJpC,CAAC,YAAY,GAAG,EAAE;;;;;EAkDrD"}
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;;kBAuJpC,CAAC,YAAY,GAAG,EAAE;;;;;EAkDrD"}
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/hooks",
3
- "version": "3.5.2-beta.7",
3
+ "version": "3.5.2-beta.8",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",