0๐
โ
I found that the answer lies in binding the instance to the variable. The final code should look like this:
data() {
const self = this; // this is the line that fixes it all
return {
reachedEnd: false,
swiperNavMenu: {
on: {
reachEnd: function(){
self.reachedEnd=true
}
}
}
};
},
Still thanks to sugars for pointing the way.
๐คArtvader
1๐
Your problem is related that reachedBeginning
and reachedEnd
variables are not defined
...
data() {
return {
reachedBeginning: false,
reachedEnd: false,
swiperNavMenu: {
freeMode: true,
slidesPerView: 5.75,
on: {
reachBeginning: ()=> {
this.reachedBeginning = true;
},
reachEnd: ()=> {
this.reachedEnd = true;
}
}
}
}
},
...
๐คsugars
Source:stackexchange.com