update active note
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { notes, findNotes, activeNote } from '@/composables/useNotes'
|
||||
import { notes, findNotes, setActiveNote } from '@/composables/useNotes'
|
||||
|
||||
const active = ref(false)
|
||||
watch(active, () => {
|
||||
@@ -15,7 +15,7 @@ const results = computed<Note[]>(() => {
|
||||
})
|
||||
|
||||
const goToNote = (note: Note) => {
|
||||
activeNote.value = note
|
||||
setActiveNote(note.id)
|
||||
active.value = false
|
||||
if (queryElem.value) queryElem.value.blur()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user