mirror of https://github.com/FreeTubeApp/FreeTube
Fix bookmark search results when search suggestions are disabled
This commit is contained in:
parent
0572d33cd2
commit
88ec2a82cb
|
@ -303,7 +303,6 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
updateVisibleDataList: function () {
|
||||
if (this.dataList.length === 0) { return }
|
||||
// Reset selected option before it's updated
|
||||
this.searchState.selectedOption = -1
|
||||
this.searchState.keyboardSelectedOptionIndex = -1
|
||||
|
|
|
@ -271,12 +271,15 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
getSearchSuggestionsDebounce: function (query) {
|
||||
const trimmedQuery = query.trim()
|
||||
if (trimmedQuery === this.lastSuggestionQuery) {
|
||||
return
|
||||
}
|
||||
|
||||
this.lastSuggestionQuery = trimmedQuery
|
||||
|
||||
if (this.enableSearchSuggestions) {
|
||||
const trimmedQuery = query.trim()
|
||||
if (trimmedQuery !== this.lastSuggestionQuery) {
|
||||
this.lastSuggestionQuery = trimmedQuery
|
||||
this.debounceSearchResults(trimmedQuery)
|
||||
}
|
||||
this.debounceSearchResults(trimmedQuery)
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue