Discussion icon indicating copy to clipboard operation
Discussion copied to clipboard

Can you watch component property?

Open mark-hahn opened this issue 9 years ago • 5 comments

When a props value changes should a watch be fired on the prop? It doesn't seem to work.

mark-hahn avatar Jul 02 '15 18:07 mark-hahn

don't know if it's related but it would be nice if we could use v-referenced attributes on a computed property

thelinuxlich avatar Jul 03 '15 00:07 thelinuxlich

I've been successfully watching props. Fiddle maybe?

azamat-sharapov avatar Jul 03 '15 09:07 azamat-sharapov

@azamat-sharapov yes, a fiddle would be helpful

therealchiko avatar Jun 30 '16 07:06 therealchiko

@therealchiko here you go: https://plnkr.co/edit/nTNcqLBBTA6zTTxRt0Xq?p=preview

au-z avatar May 23 '17 19:05 au-z

If you are trying to use v-model='myProp' it doesn't seem to allow you to watch the 'value' prop inside the component. If you use :value='myProp', it does seem to work though.

mbignold avatar May 29 '17 01:05 mbignold