Searching now doesn't resets you to the ALL tab
This commit is contained in:
parent
2b8801d49a
commit
a4f3f843e7
42103
public/js/bundle.js
42103
public/js/bundle.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -110,12 +110,12 @@ const MainSearch = new Vue({
|
|||||||
handleMainSearch(result) {
|
handleMainSearch(result) {
|
||||||
let resetObj = { data: [], next: 0, total: 0, loaded: false }
|
let resetObj = { data: [], next: 0, total: 0, loaded: false }
|
||||||
this.results.allTab = result
|
this.results.allTab = result
|
||||||
this.results.query = result.QUERY
|
|
||||||
this.results.trackTab = { ...resetObj }
|
this.results.trackTab = { ...resetObj }
|
||||||
this.results.albumTab = { ...resetObj }
|
this.results.albumTab = { ...resetObj }
|
||||||
this.results.artistTab = { ...resetObj }
|
this.results.artistTab = { ...resetObj }
|
||||||
this.results.playlistTab = { ...resetObj }
|
this.results.playlistTab = { ...resetObj }
|
||||||
document.getElementById('search_all_tab').click()
|
if (this.results.query == '') document.getElementById('search_all_tab').click()
|
||||||
|
this.results.query = result.QUERY
|
||||||
document.getElementById('search_tab_content').style.display = 'block'
|
document.getElementById('search_tab_content').style.display = 'block'
|
||||||
document.getElementById('main_search_tablink').click()
|
document.getElementById('main_search_tablink').click()
|
||||||
},
|
},
|
||||||
|
@ -42,7 +42,6 @@ function handleSearchBarKeyup(e) {
|
|||||||
document.getElementById('search_tab_content').style.display = 'none'
|
document.getElementById('search_tab_content').style.display = 'none'
|
||||||
socket.emit('mainSearch', { term: term })
|
socket.emit('mainSearch', { term: term })
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('search_all_tab').click()
|
|
||||||
document.getElementById('search_tab_content').style.display = 'block'
|
document.getElementById('search_tab_content').style.display = 'block'
|
||||||
document.getElementById('main_search_tablink').click()
|
document.getElementById('main_search_tablink').click()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user