sync with local storage
This commit is contained in:
@@ -10,7 +10,7 @@ const notesWithReferences = computed(() => {
|
||||
})
|
||||
|
||||
const selectedNotes = ref<{ [key: string]: Boolean }>({})
|
||||
const countSelectedNotes = computed(
|
||||
const countSelectedNotes = computed<number>(
|
||||
() => Object.entries(selectedNotes.value).filter(([, selected]) => Boolean(selected)).length
|
||||
)
|
||||
|
||||
@@ -18,7 +18,7 @@ const toggleRow = (note: Note) => {
|
||||
if (!note.isRoot) selectedNotes.value[note.id] = !selectedNotes.value[note.id]
|
||||
}
|
||||
|
||||
const filter = ref('')
|
||||
const filter = ref<string>('')
|
||||
|
||||
const deleteSelectedNotes = (closeModal: () => void) => {
|
||||
closeModal()
|
||||
|
||||
@@ -17,7 +17,7 @@ const emit = defineEmits<{
|
||||
update: [note: Note]
|
||||
}>()
|
||||
|
||||
const noteTitle = ref(props.note.title)
|
||||
const noteTitle = ref<string>(props.note.title)
|
||||
watch(noteTitle, () => {
|
||||
const updatedNote: Note = { ...props.note, title: noteTitle.value }
|
||||
emit('update', updatedNote)
|
||||
|
||||
Reference in New Issue
Block a user