`model` prop on md-checkbox is undocumented
mcFrax opened this issue · 0 comments
The model prop in 1.0.0 version is model
instead of value
, but this is not documented. I had to find it in the source code.
Adding model
to props list in MdCheckbox domuentation would help, perhaps something like
model: The prop used by
v-model
. Usuallyv-model
usesvalue
prop for binding the model to components, but asvalue
has different meaning for checkboxes, we usemodel
here instead.
Relevant Vue documentation links:
- https://vuejs.org/v2/guide/components.html#Using-v-model-on-Components
- https://vuejs.org/v2/guide/components-custom-events.html#Customizing-Component-v-model
Context
My app needs prop+event binding instead of v-model (or at least, it is much easier this way), and I needed to change :value
bindings to :model
, which was not obvious and took quite a while to figure. The behavior when setting :value
instead of :model
is really weird, somehow the checkboxes show the opposite state, and they don't work at all.