CSR-762 Wrap up list-card
This commit is contained in:
parent
4ae0b4e54b
commit
4a2e21fe25
3 changed files with 8 additions and 14 deletions
|
|
@ -51,7 +51,7 @@
|
||||||
:groupName="groupName"
|
:groupName="groupName"
|
||||||
:value="answer.value"
|
:value="answer.value"
|
||||||
:modelValue="modelValue"
|
:modelValue="modelValue"
|
||||||
selectingInitiatesLoad
|
:selectingInitiatesLoad="selectingInitiatesLoad"
|
||||||
:isWide="isWide"
|
:isWide="isWide"
|
||||||
:validationRules="validationRules"
|
:validationRules="validationRules"
|
||||||
:textPosition="textPosition"
|
:textPosition="textPosition"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
:checked="isChecked"
|
:checked="isChecked"
|
||||||
@keypress.enter="handleEventAction('keypressSubmit', $event)"
|
@keypress.enter="handleEventAction('keypressSubmit', $event)"
|
||||||
@keypress.space="handleEventAction('keypressSubmit', $event)"
|
@keypress.space="handleEventAction('keypressSubmit', $event)"
|
||||||
@change="handleEventAction('keypress', $event)"
|
@change="handleEventAction('change', $event)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
|
@ -84,7 +84,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
handleEventAction(eventType, e) {
|
handleEventAction(eventType, e) {
|
||||||
const eventTypes = {
|
const eventTypes = {
|
||||||
KEYPRESS: "keypress",
|
CHANGE: "change",
|
||||||
KEYPRESS_SUBMIT: "keypressSubmit",
|
KEYPRESS_SUBMIT: "keypressSubmit",
|
||||||
CLICK: "click",
|
CLICK: "click",
|
||||||
};
|
};
|
||||||
|
|
@ -96,7 +96,7 @@ export default {
|
||||||
console.log("clicking");
|
console.log("clicking");
|
||||||
this.handleClick(e);
|
this.handleClick(e);
|
||||||
break;
|
break;
|
||||||
case eventTypes.KEYPRESS:
|
case eventTypes.CHANGE:
|
||||||
console.log("selectOnKeypress: ", this.selectOnKeypress);
|
console.log("selectOnKeypress: ", this.selectOnKeypress);
|
||||||
this.selectOnKeypress
|
this.selectOnKeypress
|
||||||
? this.handleClick(e)
|
? this.handleClick(e)
|
||||||
|
|
@ -105,7 +105,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hasFirstEventFired = eventType !== eventTypes.KEYPRESS;
|
this.hasFirstEventFired = eventType !== eventTypes.CHANGE;
|
||||||
|
|
||||||
console.log("handleKeypress: ", eventType);
|
console.log("handleKeypress: ", eventType);
|
||||||
// console.log({
|
// console.log({
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
:groupName="groupName"
|
:groupName="groupName"
|
||||||
buttonType="listButtonHorizontal"
|
buttonType="listButtonHorizontal"
|
||||||
useTextForValue
|
useTextForValue
|
||||||
v-model="selectedChipCountValues"
|
v-model="selectedValue"
|
||||||
:validationRules="validationRules"
|
:validationRules="validationRules"
|
||||||
isRequired
|
isRequired
|
||||||
/>
|
/>
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import buttonQuestion from "@/common-components/button-question/button-question";
|
import buttonQuestion from "@/common-components/button-question/button-question";
|
||||||
|
import buttonQuestionWrapperMixin from "@/mixins/button-question-wrapper-mixin";
|
||||||
|
|
||||||
export default ({
|
export default ({
|
||||||
name: "windshieldOptions",
|
name: "windshieldOptions",
|
||||||
|
mixins: [buttonQuestionWrapperMixin],
|
||||||
props: {
|
props: {
|
||||||
modelValue: Array,
|
modelValue: Array,
|
||||||
groupName: String,
|
groupName: String,
|
||||||
|
|
@ -42,14 +44,6 @@ export default ({
|
||||||
answersFromCms(){
|
answersFromCms(){
|
||||||
return this.getCmsContent(this.cmsWidgetName, 'Answers');
|
return this.getCmsContent(this.cmsWidgetName, 'Answers');
|
||||||
},
|
},
|
||||||
selectedChipCountValues: {
|
|
||||||
get: function() {
|
|
||||||
return this.modelValue;
|
|
||||||
},
|
|
||||||
set: function(newValue) {
|
|
||||||
this.$emit("update:modelValue", newValue);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
isAvailable(val) {
|
isAvailable(val) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue