Closed henriquecustodia closed 4 years ago
Hey there!
I'm trying to watch a boolean prop but when I've change the value, the watch not works
For example:
props: { show: { type: Boolean, default: false }, }, watch: { show: { handler(val) { // called only on mounted lifecycle }, immediate: true }
When I change the show prop to:
show
props: { show: Boolean }, watch: { show: { handler(val) { // called after every change }, immediate: true }
It works...
"vue": "2.6.10" "vue-custom-element": "3.2.5" Browser: Chrome
Thanks!
Hi, it seems to work fine - https://codesandbox.io/s/vue-template-88l5p?file=/src/main.js
Hey there!
I'm trying to watch a boolean prop but when I've change the value, the watch not works
For example:
When I change the
show
prop to:It works...
"vue": "2.6.10" "vue-custom-element": "3.2.5" Browser: Chrome
Thanks!