Browse Source

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

Kristian Vos 2 years ago
parent
commit
8d759ea2ca
1 changed files with 3 additions and 3 deletions
  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);