CSR-2419
Home Address lookup remove default focus
This commit is contained in:
parent
97ab3c478b
commit
f332449ef6
3 changed files with 21 additions and 3 deletions
|
|
@ -124,6 +124,10 @@ export default {
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isAddressFieldFocused: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -225,7 +229,9 @@ export default {
|
|||
).then(() => {
|
||||
// When loaded, trigger the setup
|
||||
this.initializeAutocomplete();
|
||||
this.addressField1.focus();
|
||||
if (this.isAddressFieldFocused) {
|
||||
this.addressField1.focus();
|
||||
}
|
||||
});
|
||||
},
|
||||
initializeAutocomplete() {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@
|
|||
ref="customerQuestions"
|
||||
v-model="customerQuestions"
|
||||
:validationRules="EmailValidationRules"
|
||||
:isEmailOptional="IsEmailOptional" />
|
||||
:isEmailOptional="IsEmailOptional"
|
||||
:isAddressFieldFocused="IsAddressFieldFocused" />
|
||||
<alert
|
||||
ref="alertVinNotFound"
|
||||
v-if="displayVinNotFoundAlert"
|
||||
|
|
@ -443,6 +444,9 @@ export default {
|
|||
.replaceAll("{custom:vinYmmFound}", vinYmmFound)
|
||||
.replaceAll("{custom:vinYmmExpected}", vinYmmExpected);
|
||||
},
|
||||
IsAddressFieldFocused() {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
customerQuestions: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
<template>
|
||||
<div class="customer-questions">
|
||||
<addressQuestions ref="addressQuestions" v-model="customerModel.addressQuestions" />
|
||||
<addressQuestions
|
||||
ref="addressQuestions"
|
||||
v-model="customerModel.addressQuestions"
|
||||
:isAddressFieldFocused="isAddressFieldFocused" />
|
||||
<div class="row mb-4">
|
||||
<div class="col">
|
||||
<textboxQuestion
|
||||
|
|
@ -87,6 +90,11 @@ export default {
|
|||
},
|
||||
validationRules: String,
|
||||
isEmailOptional: Boolean,
|
||||
isAddressFieldFocused: {
|
||||
required: false,
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
customerModel: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue