From a6e8bb51c535a8d1a6095d7b968d2468868a72fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20T=C3=A4kker?= Date: Fri, 25 Sep 2026 22:51:11 +0200 Subject: [PATCH] Split search result rows --- app/components/Search/Row.vue | 143 ++++++++++++++++++++++++++++++++++ app/pages/search.vue | 19 ++--- 2 files changed, 151 insertions(+), 11 deletions(-) create mode 100644 app/components/Search/Row.vue diff --git a/app/components/Search/Row.vue b/app/components/Search/Row.vue new file mode 100644 index 0000000..a1c0a49 --- /dev/null +++ b/app/components/Search/Row.vue @@ -0,0 +1,143 @@ + + + + + diff --git a/app/pages/search.vue b/app/pages/search.vue index f3dc0bc..7ca5796 100644 --- a/app/pages/search.vue +++ b/app/pages/search.vue @@ -24,9 +24,14 @@ watch(query, (value) => { clearTimeout(debounceTimeout) debounceTimeout = setTimeout(() => { debouncedQuery.value = value + debounceTimeout = undefined }, 300) }) +onBeforeUnmount(() => { + clearTimeout(debounceTimeout) +}) + const { data, status, error } = await useApiFetch("/search", { query: { q: debouncedQuery, limit: 9 }, watch: [debouncedQuery], @@ -110,18 +115,10 @@ const playResult = (result: SearchResult | Track) => { v-for="(result, index) in results" :key="`${result.type}-${result._id}`" > - -