Fixed bug that was clearing out Vin when re-focusing field after blurring away.

This commit is contained in:
Leah Schumann 2022-06-14 10:14:12 -04:00
parent b1328b7cdc
commit a32b401418

View file

@ -187,6 +187,7 @@ export default {
invalidZip: '',
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
initialVin: this.getVinFromStore(),
vinTouched: false,
};
},
mounted() {
@ -250,8 +251,12 @@ export default {
},
methods: {
setVinTouched() {
this.vinMask = "XXXXXXXXXXXXXXXXX";
this.vin = this.initialVin;
if (!this.vinTouched) {
this.vinMask = "XXXXXXXXXXXXXXXXX";
this.vin = this.initialVin;
}
this.vinTouched = true;
},
setupVinMask() {
const lastSixChars = this.initialVin.substring(11, this.initialVin.length);