We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b48354 commit 07957f7Copy full SHA for 07957f7
webui/src/components/dashboard/Search.vue
@@ -1,6 +1,6 @@
1
<script setup lang="ts">
2
import router from '@/router';
3
-import { computed, onMounted, ref } from 'vue';
+import { computed, onMounted, ref, watch } from 'vue';
4
import { useRoute } from 'vue-router';
5
6
const route = useRoute()
@@ -33,6 +33,13 @@ const pageRange = computed(() => {
33
34
return Array.from({ length: end - start + 1 }, (_, i) => start + i)
35
})
36
+let timeout: number;
37
+watch(queryText, async (q) => {
38
+ // debounced
39
+ clearTimeout(timeout)
40
+ timeout = setTimeout(async () => {await search()}, 300)
41
+})
42
+
43
function navigateToSearchResult(result: any) {
44
switch (result.type.toLowerCase()) {
45
case 'http':
0 commit comments