Save created notes to store
This commit is contained in:
parent
5fa8a0466e
commit
3d2941791e
1 changed files with 11 additions and 2 deletions
|
|
@ -75,6 +75,15 @@ function onClick() {
|
|||
|
||||
toggleOpen();
|
||||
}
|
||||
|
||||
function onCreatorClose() {
|
||||
creating.value = false;
|
||||
}
|
||||
|
||||
function onCreatorFinish(text: string) {
|
||||
notes.appendNewChildNote(props.noteId, text);
|
||||
onCreatorClose();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -120,8 +129,8 @@ function onClick() {
|
|||
<div v-if="creating" class="pl-2">
|
||||
<CNoteCreator
|
||||
:parent-id="props.noteId"
|
||||
@close="creating = false"
|
||||
@finish="creating = false"
|
||||
@close="onCreatorClose()"
|
||||
@finish="(text) => onCreatorFinish(text)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue