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,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
isAddressFieldFocused: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -225,7 +229,9 @@ export default {
|
||||||
).then(() => {
|
).then(() => {
|
||||||
// When loaded, trigger the setup
|
// When loaded, trigger the setup
|
||||||
this.initializeAutocomplete();
|
this.initializeAutocomplete();
|
||||||
this.addressField1.focus();
|
if (this.isAddressFieldFocused) {
|
||||||
|
this.addressField1.focus();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initializeAutocomplete() {
|
initializeAutocomplete() {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
ref="customerQuestions"
|
ref="customerQuestions"
|
||||||
v-model="customerQuestions"
|
v-model="customerQuestions"
|
||||||
:validationRules="EmailValidationRules"
|
:validationRules="EmailValidationRules"
|
||||||
:isEmailOptional="IsEmailOptional" />
|
:isEmailOptional="IsEmailOptional"
|
||||||
|
:isAddressFieldFocused="IsAddressFieldFocused" />
|
||||||
<alert
|
<alert
|
||||||
ref="alertVinNotFound"
|
ref="alertVinNotFound"
|
||||||
v-if="displayVinNotFoundAlert"
|
v-if="displayVinNotFoundAlert"
|
||||||
|
|
@ -443,6 +444,9 @@ export default {
|
||||||
.replaceAll("{custom:vinYmmFound}", vinYmmFound)
|
.replaceAll("{custom:vinYmmFound}", vinYmmFound)
|
||||||
.replaceAll("{custom:vinYmmExpected}", vinYmmExpected);
|
.replaceAll("{custom:vinYmmExpected}", vinYmmExpected);
|
||||||
},
|
},
|
||||||
|
IsAddressFieldFocused() {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
customerQuestions: {
|
customerQuestions: {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="customer-questions">
|
<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="row mb-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
|
|
@ -87,6 +90,11 @@ export default {
|
||||||
},
|
},
|
||||||
validationRules: String,
|
validationRules: String,
|
||||||
isEmailOptional: Boolean,
|
isEmailOptional: Boolean,
|
||||||
|
isAddressFieldFocused: {
|
||||||
|
required: false,
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
customerModel: {
|
customerModel: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue