fix for hints
This commit is contained in:
parent
ee6a3ba499
commit
291a0da90b
2 changed files with 5 additions and 3 deletions
|
@ -1193,8 +1193,9 @@ const app = new Vue({
|
|||
break;
|
||||
}
|
||||
},
|
||||
async searchQuery() {
|
||||
async searchQuery(term = this.search.term) {
|
||||
let self = this
|
||||
console.log(`searching: ${term}`)
|
||||
this.mk.api.search(this.search.term,
|
||||
{
|
||||
types: "activities,albums,apple-curators,artists,curators,editorial-items,music-movies,music-videos,playlists,songs,stations,tv-episodes,uploaded-videos,record-labels",
|
||||
|
|
|
@ -126,13 +126,14 @@
|
|||
<input type="search" spellcheck="false" @click="showSearch()"
|
||||
@focus="search.showHints = true"
|
||||
@blur="setTimeout(()=>{search.showHints = false}, 100)"
|
||||
@change="showSearch();searchQuery()" @input="getSearchHints()" placeholder="Search..." v-model="search.term"
|
||||
v-on:keyup.enter="searchQuery()"
|
||||
@change="showSearch();" @input="getSearchHints()" placeholder="Search..." v-model="search.term"
|
||||
class="search-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-hints-container" v-if="search.showHints && search.hints.length != 0">
|
||||
<div class="search-hints">
|
||||
<button class="search-hint" v-for="hint in search.hints" @click="search.term = hint;search.showHints = false;searchQuery()">
|
||||
<button class="search-hint" v-for="hint in search.hints" @click="search.term = hint;search.showHints = false;searchQuery(hint)">
|
||||
{{ hint }}
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue