vuematerial / vue-material

Vue.js Framework - ready-to-use Vue components with Material Design, free forever.
https://www.creative-tim.com/vuematerial
MIT License
9.88k stars 1.16k forks source link

`model` prop on md-checkbox is undocumented #2240

Open mcFrax opened 4 years ago

mcFrax commented 4 years ago

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. Usually v-model uses value prop for binding the model to components, but as value has different meaning for checkboxes, we use model here instead.

Relevant Vue documentation links:

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.