Explorar o código

fix(ScrollAndFetchHandler): scrolling no longer loaded new sets after Vue 3 migration

Kristian Vos %!s(int64=2) %!d(string=hai) anos
pai
achega
8d759ea2ca
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      frontend/src/mixins/ScrollAndFetchHandler.vue

+ 3 - 3
frontend/src/mixins/ScrollAndFetchHandler.vue

@@ -1,8 +1,5 @@
 <script>
 export default {
-	setup() {
-		window.addEventListener("scroll", this.handleScroll);
-	},
 	data() {
 		return {
 			position: 1,
@@ -20,6 +17,9 @@ export default {
 			return this.maxPosition - 1;
 		}
 	},
+	mounted() {
+		window.addEventListener("scroll", this.handleScroll);
+	},
 	unmounted() {
 		clearInterval(this.interval);
 		window.removeEventListener("scroll", this.handleScroll);