From c22eb5b57ab19cba964d9ff8964f1b62c94d3685 Mon Sep 17 00:00:00 2001 From: Henrik Askjer <henrik.askjer@uib.no> Date: Tue, 21 Dec 2021 15:34:29 +0100 Subject: [PATCH] fix search term routing issue --- src/components/Autocomplete.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Autocomplete.vue b/src/components/Autocomplete.vue index 26754051..fbc1717b 100644 --- a/src/components/Autocomplete.vue +++ b/src/components/Autocomplete.vue @@ -103,15 +103,20 @@ import Menu from './Menu.vue' }, select(item) { if (item) { + if (typeof item != 'string') { this.items = [] this.suggesting = false - if (this.inflection_suggestions.length) { + if (this.inflection_suggestions && this.inflection_suggestions.length) { item.inflection_suggestions = this.inflection_suggestions } this.submit(item) - + } } + }, + $route (to, from) { + console.log("TO", to) + this.select = to.query.q } }, methods: { -- GitLab