Updating name for button question emit method
This commit is contained in:
parent
7294e3c78c
commit
2eb2d84ba6
4 changed files with 8 additions and 5 deletions
|
|
@ -11,7 +11,7 @@
|
|||
:is="buttonType"
|
||||
v-for="answer in answers"
|
||||
:key="answer.Name ? answer.Name : answer"
|
||||
@isChecked="handleCheckedChanged"
|
||||
@isCheckedChanged="handleCheckedChanged"
|
||||
:buttonID="answer.Name ? answer.Name : answer"
|
||||
:value="answer.Name ? answer.Name : answer"
|
||||
:buttonLabel="answer.Text ? answer.Text : answer"
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export default {
|
|||
type: String,
|
||||
default: "",
|
||||
},
|
||||
modelValue: false,
|
||||
modelValue: [Array, String],
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -77,6 +77,9 @@ export default {
|
|||
checkValue: Boolean,
|
||||
};
|
||||
},
|
||||
created(){
|
||||
this.checkValue = this.modelValue ? this.modelValue.includes(this.buttonID) : false;
|
||||
},
|
||||
methods: {
|
||||
displayLoader() {
|
||||
this.isLoaderDisplayed = true;
|
||||
|
|
@ -90,7 +93,7 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
checkValue(){
|
||||
this.$emit('isChecked', {isChecked: this.checkValue, buttonId: this.buttonID});
|
||||
this.$emit('isCheckedChanged', {isChecked: this.checkValue, buttonId: this.buttonID});
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
checkValue(){
|
||||
this.$emit('isChecked', {isChecked: this.checkValue, buttonId: this.buttonID});
|
||||
this.$emit('isCheckedChanged', {isChecked: this.checkValue, buttonId: this.buttonID});
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
checkValue(){
|
||||
this.$emit('isChecked', {isChecked: this.checkValue, buttonId: this.buttonID});
|
||||
this.$emit('isCheckedChanged', {isChecked: this.checkValue, buttonId: this.buttonID});
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue