From b6bdac74ae4d0fbe2faec9782dd332c8d0c9f99c Mon Sep 17 00:00:00 2001 From: stasson Date: Sat, 10 Feb 2018 17:49:20 +0100 Subject: [PATCH] fix(radio): name prop is required fix #251 --- components/radio/README.md | 16 +++++++++------- components/radio/mdc-radio.vue | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/components/radio/README.md b/components/radio/README.md index f1995584..e24aaeb6 100644 --- a/components/radio/README.md +++ b/components/radio/README.md @@ -1,9 +1,9 @@ ## Usage ```html - - - + + +

Answer: {{ answer }}

``` @@ -19,23 +19,25 @@ var vm = new Vue({ > or use default slot for label ```html -Yes for sure -definitely NO! -"I guess" +Yes for sure +definitely NO! +"I guess" ``` ### props | props | Type | Default | Description | |-------|------|---------|-------------| +|`name`|String || radio group name (__*__) | |`label`| String|static| radio label | |`align-end`| Boolean|| align the radio after the label | -|`name`|String|| radio group name | |`value`|String| `label`| radio value, defaults to label value if any | |`checked`|Boolean|| forces this radio to be selected. follows v-model otherwise | |`:disabled`| Boolean|| whether the radio is disabled | |`v-model`| String || tracks selected radio's value | +> (__*__) name prop is required for proper behavior. + ### events | event | args | Description | diff --git a/components/radio/mdc-radio.vue b/components/radio/mdc-radio.vue index 68bb5a0a..64d66825 100644 --- a/components/radio/mdc-radio.vue +++ b/components/radio/mdc-radio.vue @@ -28,7 +28,7 @@ export default { event: 'change' }, props: { - 'name': String, + 'name': {type: String, required: true}, 'value': String, 'picked': String, 'checked': Boolean,