Fixed a bug where the searchQuery value was not kept between contexts

This commit is contained in:
Simon Cambier
2022-09-30 20:50:22 +02:00
parent 3f9d3c4f80
commit 342e36aa08
2 changed files with 8 additions and 1 deletions

View File

@@ -87,8 +87,12 @@
modal.close()
}
function openSearchResult(note: ResultNote, newPane = false) {
function saveCurrentQuery() {
searchHistory.unshift(searchQuery)
}
function openSearchResult(note: ResultNote, newPane = false) {
saveCurrentQuery()
saveSearchHistory()
openNote(note, newPane)
}
@@ -139,6 +143,7 @@
}
function switchToInFileModal(): void {
saveCurrentQuery()
modal.close()
if (selectedNote) {
// Open in-file modal for selected search result