From 2eb2d84ba607af39f93c09963f70f9aac8d4bfb5 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 2 Feb 2022 14:43:15 -0500 Subject: [PATCH] Updating name for button question emit method --- src/common-components/button-question/button-question.vue | 2 +- .../list-button-horizontal/list-button-horizontal.vue | 7 +++++-- src/ux-components/list-button/list-button.vue | 2 +- src/ux-components/list-card/list-card.vue | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/common-components/button-question/button-question.vue b/src/common-components/button-question/button-question.vue index 13cb43240..6031061ab 100644 --- a/src/common-components/button-question/button-question.vue +++ b/src/common-components/button-question/button-question.vue @@ -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" diff --git a/src/ux-components/list-button-horizontal/list-button-horizontal.vue b/src/ux-components/list-button-horizontal/list-button-horizontal.vue index 652102f64..967523893 100644 --- a/src/ux-components/list-button-horizontal/list-button-horizontal.vue +++ b/src/ux-components/list-button-horizontal/list-button-horizontal.vue @@ -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: { diff --git a/src/ux-components/list-button/list-button.vue b/src/ux-components/list-button/list-button.vue index f95c19696..449f464af 100644 --- a/src/ux-components/list-button/list-button.vue +++ b/src/ux-components/list-button/list-button.vue @@ -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: { diff --git a/src/ux-components/list-card/list-card.vue b/src/ux-components/list-card/list-card.vue index b6b906ca2..a6e2968b9 100644 --- a/src/ux-components/list-card/list-card.vue +++ b/src/ux-components/list-card/list-card.vue @@ -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) {