Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joelit committed Jan 31, 2024
1 parent 93eb5eb commit 43e2603
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resource/js/vocab-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const vocabSearch = Vue.createApp({
},
search () {
fetch('rest/v1/' + SKOSMOS.vocab + '/search?query=' + this.searchTerm + '*' + '&lang=' + SKOSMOS.lang)
.then( data => { return data.json() } )
.then( data => this.autoCompeteResults = data.results )
.then(data => data.json())
.then(data => { this.autoCompeteResults = data.results })

this.renderResults()
},
Expand All @@ -55,6 +55,7 @@ const vocabSearch = Vue.createApp({
hideDropdown () {
const element = document.getElementById('search-autocomplete-results')
element.classList.remove('show')
this.autoCompeteResults = []
},
gotoSearchPage () {
if (!this.searchTerm) return
Expand Down

0 comments on commit 43e2603

Please sign in to comment.