Temporarily changing id from autocomplete to streetAddress
This commit is contained in:
parent
eabe655488
commit
b97d8bf968
1 changed files with 10 additions and 4 deletions
|
|
@ -2,12 +2,13 @@
|
||||||
<div class="address-questions">
|
<div class="address-questions">
|
||||||
<div class="row mb-4" aria-live="polite">
|
<div class="row mb-4" aria-live="polite">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
<!-- Temporarily changing id from autocomplete to streetAddress -->
|
||||||
<textboxQuestion
|
<textboxQuestion
|
||||||
id="streetAddressField"
|
id="streetAddressField"
|
||||||
cmsWidgetName="StreetAddressQuestionWidget"
|
cmsWidgetName="StreetAddressQuestionWidget"
|
||||||
v-model="addressModel.streetAddress"
|
v-model="addressModel.streetAddress"
|
||||||
ref="autocomplete"
|
ref="autocomplete"
|
||||||
customInputId="autocomplete"
|
customInputId="streetAddress"
|
||||||
placeholderText="Search"
|
placeholderText="Search"
|
||||||
aria-haspopup=""
|
aria-haspopup=""
|
||||||
hasIcon
|
hasIcon
|
||||||
|
|
@ -207,7 +208,7 @@ export default {
|
||||||
},
|
},
|
||||||
addressField1: {
|
addressField1: {
|
||||||
get: function () {
|
get: function () {
|
||||||
return document.getElementById("autocomplete");
|
return document.getElementById("streetAddress");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
isTouchDevice: {
|
isTouchDevice: {
|
||||||
|
|
@ -293,6 +294,7 @@ export default {
|
||||||
this.addressField1.addEventListener("input", (e) => {
|
this.addressField1.addEventListener("input", (e) => {
|
||||||
// console.log(`input event`);
|
// console.log(`input event`);
|
||||||
// console.log(e);
|
// console.log(e);
|
||||||
|
const self = this;
|
||||||
console.log("input");
|
console.log("input");
|
||||||
switch (e.inputType) {
|
switch (e.inputType) {
|
||||||
case "insertText":
|
case "insertText":
|
||||||
|
|
@ -302,8 +304,11 @@ export default {
|
||||||
this.disableAutoFill();
|
this.disableAutoFill();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.matchFound = true;
|
this.$nextTick(() => {
|
||||||
this.addressField1.classList.remove("has-icon");
|
self.matchFound = true;
|
||||||
|
});
|
||||||
|
//this.matchFound = true;
|
||||||
|
//this.addressField1.classList.remove("has-icon");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -526,6 +531,7 @@ export default {
|
||||||
this.showAddressFields = true;
|
this.showAddressFields = true;
|
||||||
this.addressField1.classList.remove("has-icon");
|
this.addressField1.classList.remove("has-icon");
|
||||||
}
|
}
|
||||||
|
console.log("match found watch");
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue