Reorganized onModalOpen code
This commit is contained in:
parent
5e09e05216
commit
7324053990
1 changed files with 7 additions and 3 deletions
|
|
@ -222,6 +222,12 @@ export default {
|
||||||
this.pushEventToGA(this.GaCategories.SERVICE_LOCATION, this.GaActions.MORE_LOCATIONS_CLICKED, joinedShops, true);
|
this.pushEventToGA(this.GaCategories.SERVICE_LOCATION, this.GaActions.MORE_LOCATIONS_CLICKED, joinedShops, true);
|
||||||
},
|
},
|
||||||
onModalOpened() {
|
onModalOpened() {
|
||||||
|
// Reset local state from parent
|
||||||
|
this.localShopProviderData = this.shopProviderDataFromParent;
|
||||||
|
this.localSelectedProviderNumber = this.selectedProviderNumberFromParent;
|
||||||
|
this.localZipCode = this.zipCodeFromParent;
|
||||||
|
this.answers = [];
|
||||||
|
|
||||||
const selectedProviderNumberFromParentIndex = this.shopProviders.findIndex(
|
const selectedProviderNumberFromParentIndex = this.shopProviders.findIndex(
|
||||||
(provider) => provider.providerNumber == this.selectedProviderNumberFromParent
|
(provider) => provider.providerNumber == this.selectedProviderNumberFromParent
|
||||||
);
|
);
|
||||||
|
|
@ -232,10 +238,8 @@ export default {
|
||||||
this.indexOfLastShopToBeDisplayed = 3;
|
this.indexOfLastShopToBeDisplayed = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.localShopProviderData = this.shopProviderDataFromParent;
|
|
||||||
this.answers = [];
|
|
||||||
this.updateShopsForZip(this.localZipCode);
|
this.updateShopsForZip(this.localZipCode);
|
||||||
this.localSelectedProviderNumber = this.selectedProviderNumberFromParent;
|
|
||||||
},
|
},
|
||||||
closeModal() {
|
closeModal() {
|
||||||
this.modal.closeModal();
|
this.modal.closeModal();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue