Skip to content

Commit 1e9db8e

Browse files
committed
vue-generators#551 - added "is-disabled" class to the radios label
1 parent 8c6c7eb commit 1e9db8e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/fields/core/fieldRadios.vue

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template lang="pug">
22
.radio-list(:disabled="disabled", v-attributes="'wrapper'")
3-
label(v-for="item in items", :class="{'is-checked': isItemChecked(item)}", v-attributes="'label'")
3+
label(v-for="item in items", :class="getItemCssClasses(item)", v-attributes="'label'")
44
input(:id="getFieldID(schema, true)", type="radio", :disabled="isItemDisabled(item)", :name="id", @click="onSelection(item)", :value="getItemValue(item)", :checked="isItemChecked(item)", :class="schema.fieldClasses", :required="schema.required", v-attributes="'input'")
55
| {{ getItemName(item) }}
66

@@ -58,6 +58,12 @@ export default {
5858
return item;
5959
}
6060
},
61+
getItemCssClasses(item) {
62+
return {
63+
"is-checked": this.isItemChecked(item),
64+
"is-disabled": this.isItemDisabled(item)
65+
};
66+
},
6167
onSelection(item) {
6268
this.value = this.getItemValue(item);
6369
},

0 commit comments

Comments
 (0)