diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue index 4bfad830655c506f4e187d740ea8bd2156fd1b28..a4509ad4379de9678a9d837c7696781842a7ecff 100644 --- a/src/components/DictionaryView.vue +++ b/src/components/DictionaryView.vue @@ -2,7 +2,7 @@ <main> <div class="search_container"> <div class="lang_select_container"> - <v-radio-group row v-model="lang" @change="force_rerender"> + <v-radio-group row v-model="lang" @change="update_lang_form"> <template v-slot:label> <span>VIS</span> </template> @@ -201,7 +201,6 @@ export default { if(event.articles){ let source = '/' + this.lang + '/w/' + event.word this.$router.push(source) - console.log(this.$router) this.search_results = event.articles.sort(compare_by_hgno(decodeURIComponent(event.word))).map(a => Object.assign(a, {source: source})) this.article = null this.error = null @@ -215,13 +214,13 @@ export default { this.$plausible.trackEvent('dropdown selection', {props: {query: event.label, match: '<fritekstsøk>'}}) } }, - force_rerender: function(event) { + update_lang_form: function(event) { if (this.event){ this.event.articles = null this.select_result(this.event) } else{ - navigate_to_search(this, this.$router.history.current.params.word) + navigate_to_search(this, this.$router.history.current.params.word || this.$router.history.current.params.query) } }, article_link_click: function(item) {