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();
|
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>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue