Hiding field when empty #4538
-
Hey, what would be the best way to hide an Autocomplete field when it's value is empty? I made this CSB: https://codesandbox.io/s/rhf-autocomplete-multiple-i2hqi?file=/src/index.js:1240-1252 I can see that when I am trying to call For me the expected behavior for the example in the CSB would be to present the Autocomplete fields (I have also added a version with multiple values) at start, because they have the default country set to Afghanistan and as soon as I remove the this country the whole field disappears and re-appears when I reset the form |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Added |
Beta Was this translation helpful? Give feedback.
Added
useWatch
and it works like a charm!