react-hook-form 7.55.0-next.3 → 7.55.0-next.5

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":"createFormControl.d.ts","sourceRoot":"","sources":["../../src/logic/createFormControl.ts"],"names":[],"mappings":"AACA,OAAO,EAaL,WAAW,EAgBX,YAAY,EAIZ,aAAa,EAUd,MAAM,UAAU,CAAC;AAoDlB,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EAEd,KAAK,GAAE,YAAY,CAAC,YAAY,EAAE,QAAQ,CAAM,GAC/C,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,GAAG;IAC5D,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,CAAC;CACvE,CAo5CA"}
1
+ {"version":3,"file":"createFormControl.d.ts","sourceRoot":"","sources":["../../src/logic/createFormControl.ts"],"names":[],"mappings":"AACA,OAAO,EAaL,WAAW,EAgBX,YAAY,EAIZ,aAAa,EAUd,MAAM,UAAU,CAAC;AAoDlB,wBAAgB,iBAAiB,CAC/B,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,QAAQ,GAAG,GAAG,EAEd,KAAK,GAAE,YAAY,CAAC,YAAY,EAAE,QAAQ,CAAM,GAC/C,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,GAAG;IAC5D,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,CAAC;CACvE,CAs5CA"}
@@ -1203,8 +1203,10 @@ function createFormControl(props = {}) {
1203
1203
  });
1204
1204
  if (shouldSkipValidation) {
1205
1205
  if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) {
1206
- if (_options.mode === 'onBlur' && isBlurEvent) {
1207
- _setValid();
1206
+ if (_options.mode === 'onBlur') {
1207
+ if (isBlurEvent) {
1208
+ _setValid();
1209
+ }
1208
1210
  }
1209
1211
  else if (!isBlurEvent) {
1210
1212
  _setValid();
@@ -1502,11 +1504,6 @@ function createFormControl(props = {}) {
1502
1504
  e.persist && e.persist();
1503
1505
  }
1504
1506
  let fieldValues = cloneObject(_formValues);
1505
- if (_names.disabled.size) {
1506
- for (const name of _names.disabled) {
1507
- set(fieldValues, name, undefined);
1508
- }
1509
- }
1510
1507
  _subjects.state.next({
1511
1508
  isSubmitting: true,
1512
1509
  });
@@ -1518,6 +1515,11 @@ function createFormControl(props = {}) {
1518
1515
  else {
1519
1516
  await executeBuiltInValidation(_fields);
1520
1517
  }
1518
+ if (_names.disabled.size) {
1519
+ for (const name of _names.disabled) {
1520
+ set(fieldValues, name, undefined);
1521
+ }
1522
+ }
1521
1523
  unset(_formState.errors, 'root');
1522
1524
  if (isEmptyObject(_formState.errors)) {
1523
1525
  _subjects.state.next({