From 5bd790efe9253e8df350c20528afd24ea4d8bdbc Mon Sep 17 00:00:00 2001 From: tylerslaton Date: Fri, 22 Mar 2024 12:18:04 -0400 Subject: [PATCH] feat: enable loading when switching pages on search page Signed-off-by: tylerslaton --- src/pages/search.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/search.vue b/src/pages/search.vue index ac0546d..fbc8eae 100644 --- a/src/pages/search.vue +++ b/src/pages/search.vue @@ -9,6 +9,7 @@ const error = ref({ status: 0, message: '' }) const loading = ref(true) const page = ref(1) const totalItems = ref(0) +const isWindowScrolled = ref(false) definePageMeta({ middleware: [ @@ -31,6 +32,7 @@ const q = computed(() => { }) async function fetchData() { + loading.value = true const results = await fetch(`/api/search?q=${ q.value }&page=${page.value}`) if (!results.ok) {