|
@@ -629,17 +629,21 @@ BlazeComponent.extendComponent({
|
|
threshold: 0.25,
|
|
threshold: 0.25,
|
|
};
|
|
};
|
|
|
|
|
|
- const observer = new IntersectionObserver((entries) => {
|
|
|
|
|
|
+ this.observer = new IntersectionObserver((entries) => {
|
|
entries.forEach((entry) => {
|
|
entries.forEach((entry) => {
|
|
this.spinnerShown = entry.isIntersecting;
|
|
this.spinnerShown = entry.isIntersecting;
|
|
this.updateList();
|
|
this.updateList();
|
|
});
|
|
});
|
|
}, options);
|
|
}, options);
|
|
|
|
|
|
- observer.observe(spinner);
|
|
|
|
|
|
+ this.observer.observe(spinner);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ onDestroyed() {
|
|
|
|
+ this.observer.disconnect();
|
|
|
|
+ },
|
|
|
|
+
|
|
updateList() {
|
|
updateList() {
|
|
if (this.spinnerShown) {
|
|
if (this.spinnerShown) {
|
|
this.cardlimit.set(this.cardlimit.get() + InfiniteScrollIter);
|
|
this.cardlimit.set(this.cardlimit.get() + InfiniteScrollIter);
|