From d42059b888e3f058cd22edb1f693da652f24c77a Mon Sep 17 00:00:00 2001 From: root Date: Wed, 2 Aug 2023 20:48:23 +0530 Subject: [PATCH] Revert "Potential fix to the search menu" This reverts commit 609016eec0bb446269cd8428bcdf84dc40d86c92. --- src/routes/SearchMenu.vue | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/routes/SearchMenu.vue b/src/routes/SearchMenu.vue index 930ed8f..4c796ed 100644 --- a/src/routes/SearchMenu.vue +++ b/src/routes/SearchMenu.vue @@ -37,7 +37,11 @@ export default { } }, watch: { - searchText: 'refreshSuggestions', + searchText (val) { + if (val && val !== this.select) { + this.refreshSuggestions() + } + }, async select (val) { if (val === '') { @@ -59,23 +63,16 @@ export default { }, computed: { searchSuggestions () { - /* if (this.searchText.length === 0) { return this.actualSuggestions } else { return [this.searchText].concat(this.actualSuggestions) } - */ - return [this.searchText].concat(this.actualSuggestions) } }, methods: { refreshSuggestions: _debounce(async function refreshSuggestions () { - if (this.searchText.length === 0) { - return - } - this.requestInProgress = true const suggestions = await this.$store.dispatch('auth/makeRequest', { path: '/suggestions',