update active note
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { rootNote, notes, activeNote } from '@/composables/useNotes'
|
||||
import { rootNote, notes, setActiveNote } from '@/composables/useNotes'
|
||||
|
||||
const props = defineProps<{
|
||||
viewModes: ViewMode[]
|
||||
@@ -20,7 +20,7 @@ const emit = defineEmits<{
|
||||
<template #items>
|
||||
<SideBarMenuItem
|
||||
icon="fas fa-fw fa-home"
|
||||
@click="activeNote = rootNote"
|
||||
@click="setActiveNote(rootNote?.id)"
|
||||
:title="rootNote?.title"
|
||||
>
|
||||
{{ rootNote?.title }}
|
||||
@@ -49,7 +49,7 @@ const emit = defineEmits<{
|
||||
<SideBarMenuItem
|
||||
v-for="note in notes"
|
||||
icon="far fa-file-alt fa-fw"
|
||||
@click="activeNote = note"
|
||||
@click="setActiveNote(note.id)"
|
||||
:title="rootNote?.title"
|
||||
>
|
||||
{{ note.title }}
|
||||
|
||||
Reference in New Issue
Block a user