-
Version Number Why is this working like that? It works only with setValue call. Sandbox: https://codesandbox.io/s/watch-callback-lrj0o4?file=/src/Form.tsx |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
By default, |
Beta Was this translation helpful? Give feedback.
-
I don't know if this is related, but watch callback is also called twice when changing a form field in Controller using setValue. However in this case the field element is real. |
Beta Was this translation helpful? Give feedback.
@Darkspice
By default,
setValue
will trigger watch subscription but when trying to set the target value to form field reference, there is no real field element is registered in your example therefore another call to watch subscription is triggered as fallback for this case.