Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Commit

Permalink
fix(radio): Watch checked prop (closes #104)
Browse files Browse the repository at this point in the history
  • Loading branch information
matsp committed May 14, 2018
1 parent c3c8c85 commit 238000f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions components/radio/Radio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<div class="mdc-radio">
<input
:class="classes"
v-bind="$attrs"
:name="name"
:checked="checked"
class="mdc-radio__native-control"
type="radio"
:checked="checked"
:disabled="disabled"
@change="onChange">
<div class="mdc-radio__background">
<div class="mdc-radio__outer-circle"/>
Expand Down Expand Up @@ -69,6 +69,14 @@ export default {
onChange (event) {
this.$emit('change', this.mdcRadio.value)
}
},
watch: {
checked () {
this.mdcRadio.checked = this.checked
},
disabled () {
this.mdcRadio.disabled = this.disabled
}
}
}
</script>

0 comments on commit 238000f

Please sign in to comment.