Skip to content

callback in watch() is called twice with setValue() #9587

Answered by leapful
Darkspice asked this question in Q&A
Discussion options

You must be logged in to vote

@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.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@bluebill1049
Comment options

@TimNZ
Comment options

Answer selected by Darkspice
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants