Skip to content
Snippets Groups Projects
Commit ddfe7d3a authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

nullstill søkeboks etter valg

parent f75acf91
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<main id="app"> <main id="app">
<img alt="Vue logo" src="./assets/logo.png"> <img alt="Vue logo" src="./assets/logo.png">
<header> <header>
<autocomplete :debounceTime="50" :auto-select="true" :search="search" :get-result-value="result_view" @submit="select_result" placeholder="søk..."></autocomplete> <autocomplete :debounceTime="50" :auto-select="true" :search="search" :get-result-value="result_view" @submit="select_result" placeholder="søk..." ref="search"></autocomplete>
<input type="radio" id="radio_nob" value="nob" v-model="lang"> <input type="radio" id="radio_nob" value="nob" v-model="lang">
<label for="radio_nob">Bokmål</label> <label for="radio_nob">Bokmål</label>
<input type="radio" id="radio_nno" value="nno" v-model="lang"> <input type="radio" id="radio_nno" value="nno" v-model="lang">
...@@ -77,6 +77,8 @@ export default { ...@@ -77,6 +77,8 @@ export default {
}, },
methods: { methods: {
select_result: function(event) { select_result: function(event) {
this.$refs.search.value = ''
document.activeElement.blur()
if(event._source){ if(event._source){
this.search_results = [] this.search_results = []
this.article = event._source this.article = event._source
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<router-link :to="result.id" @click.native="article_link_click(result.article)"> <router-link :to="result.id" @click.native="article_link_click(result.article)">
{{result.label}}; {{result.label}};
</router-link> </router-link>
({{result.classification}})
</li> </li>
</ul> </ul>
</section> </section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment