Save created notes to store

This commit is contained in:
Joscha 2025-02-07 14:21:22 +01:00
parent 5fa8a0466e
commit 3d2941791e

View file

@ -75,6 +75,15 @@ function onClick() {
toggleOpen(); toggleOpen();
} }
function onCreatorClose() {
creating.value = false;
}
function onCreatorFinish(text: string) {
notes.appendNewChildNote(props.noteId, text);
onCreatorClose();
}
</script> </script>
<template> <template>
@ -120,8 +129,8 @@ function onClick() {
<div v-if="creating" class="pl-2"> <div v-if="creating" class="pl-2">
<CNoteCreator <CNoteCreator
:parent-id="props.noteId" :parent-id="props.noteId"
@close="creating = false" @close="onCreatorClose()"
@finish="creating = false" @finish="(text) => onCreatorFinish(text)"
/> />
</div> </div>