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:
2026-01-31 22:37:47 +00:00
parent f94ccc01c6
commit d15bfc86c4
4 changed files with 148 additions and 93 deletions
+6 -1
View File
@@ -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
}