WIP in-file search

This commit is contained in:
Simon Cambier
2022-04-17 22:03:06 +02:00
parent 34c771cc31
commit cfa24b9617
10 changed files with 164 additions and 94 deletions

View File

@@ -11,6 +11,7 @@ onMount(async () => {
await tick()
input.focus()
input.select()
input.value = $searchQuery
})
const debouncedOnInput = debounce(() => $searchQuery = inputValue, 100)
@@ -41,6 +42,9 @@ function moveNoteSelection(ev: KeyboardEvent): void {
} else if (ev.shiftKey) {
// Create a new note
dispatch("shift-enter", $selectedNote)
} else if (ev.altKey) {
// Create a new note
dispatch("alt-enter", $selectedNote)
} else {
// Open in current pane
dispatch("enter", $selectedNote)