react-hook-form 7.39.0 → 7.39.2

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.
@@ -360,6 +360,10 @@ function useController(props) {
360
360
  ...props.rules,
361
361
  value,
362
362
  }));
363
+ const field = get(control._fields, name);
364
+ if (field) {
365
+ field._f._c = true;
366
+ }
363
367
  React.useEffect(() => {
364
368
  const updateMounted = (name, value) => {
365
369
  const field = get(control._fields, name);
@@ -396,7 +400,6 @@ function useController(props) {
396
400
  type: EVENTS.BLUR,
397
401
  }), [name, control]),
398
402
  ref: (ref) => {
399
- const field = get(control._fields, name);
400
403
  if (field && ref) {
401
404
  field._f.ref = ref;
402
405
  }
@@ -1686,7 +1689,7 @@ function createFormControl(props = {}) {
1686
1689
  }
1687
1690
  else {
1688
1691
  fieldReference.ref.value = fieldValue;
1689
- if (!fieldReference.ref.type) {
1692
+ if (fieldReference._c) {
1690
1693
  _subjects.watch.next({
1691
1694
  name,
1692
1695
  });