Search optimizations and fixes. Prevent re-renders on hash change (redux). Clear previous search results at the start of a new search.
This commit is contained in:
@@ -135,8 +135,13 @@ export const useMainStore = defineStore('main', {
|
||||
const id = ++searchId
|
||||
searchStore = this // Store reference for worker callback
|
||||
|
||||
// Update query immediately so watchers know we're handling this
|
||||
this.query = query
|
||||
|
||||
// Clear old results immediately - don't show stale data
|
||||
this.searchResults = []
|
||||
|
||||
if (!query) {
|
||||
this.searchResults = []
|
||||
this.searchLoading = false
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user