CASH-1315: refactoring from PR review - remove watch
This commit is contained in:
parent
504a774863
commit
efee6aa70a
1 changed files with 8 additions and 7 deletions
|
|
@ -267,7 +267,9 @@ export default {
|
||||||
const inshopFirstDate = Array.isArray(this.selectableDatesInshop)
|
const inshopFirstDate = Array.isArray(this.selectableDatesInshop)
|
||||||
? this.selectableDatesInshop[0]?.date
|
? this.selectableDatesInshop[0]?.date
|
||||||
: null;
|
: null;
|
||||||
return (this.isMobileSelected && mobileFirstDate) ? mobileFirstDate + "-mobile" : inshopFirstDate;
|
return this.isMobileSelected && mobileFirstDate
|
||||||
|
? mobileFirstDate + "-mobile"
|
||||||
|
: inshopFirstDate;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -540,6 +542,8 @@ export default {
|
||||||
}
|
}
|
||||||
this.months = months;
|
this.months = months;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
// if done loading dates, then set to first available date
|
||||||
|
if (!this.selectedDate) this.selectedDate = this.firstAvailableSelectableDate;
|
||||||
|
|
||||||
if (config.preSelectedDate) {
|
if (config.preSelectedDate) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
@ -773,6 +777,9 @@ export default {
|
||||||
);
|
);
|
||||||
|
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
// if done loading dates, then set to first available date
|
||||||
|
if (!this.selectedDate) this.selectedDate = this.firstAvailableSelectableDate;
|
||||||
|
|
||||||
this.hideSomeDaysForInitialView = false; // if hid days on initial partial view, this will reveal those days
|
this.hideSomeDaysForInitialView = false; // if hid days on initial partial view, this will reveal those days
|
||||||
monthToShow.monthClass = monthToShow.monthClass.replace(" month-hidden", "");
|
monthToShow.monthClass = monthToShow.monthClass.replace(" month-hidden", "");
|
||||||
this.scrollToElement(monthToShow.monthString);
|
this.scrollToElement(monthToShow.monthString);
|
||||||
|
|
@ -844,12 +851,6 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
isLoading(newValue) {
|
|
||||||
// if done loading dates, then set to first available date
|
|
||||||
if (newValue === false && this.firstAvailableSelectableDate) {
|
|
||||||
this.selectedDate = this.firstAvailableSelectableDate;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
modelValue(newValue) {
|
modelValue(newValue) {
|
||||||
this.resetField({
|
this.resetField({
|
||||||
value: newValue,
|
value: newValue,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue