v2.0.0-alpha.8
https://jsfiddle.net/nf02Ltct/2/
the special "value" prop which is passed from v-model on the component element in the template, shuold contain a Boolean value, since the parent passes a Boolean to v-model
[Vue warn]: Invalid prop: type check failed for prop "value". Expected Boolean, got String. (found in component:
) Suspicion:
I think it has something to do with whith this comment:
https://github.com/vuejs/vue/blob/v2.0.0-alpha.8/src/platforms/web/runtime/modules/props.js#L20-L21
Fixed this, and also introduced a small breaking change: the component can now directly emit the value:
this.$emit('input', value)
Instead of
this.$emit('input', { target: { value }})
This also means when emitting the value of a native event you will need to do
this.$emit('input', e.target.value)
Thanks for the quick fix.
I like the change, it fits with the usual procedure of passing event.target.value when emitting/dispatching events today.
Most helpful comment
Fixed this, and also introduced a small breaking change: the component can now directly emit the value:
Instead of
This also means when emitting the value of a native event you will need to do