update title placeholder on save note

This commit is contained in:
Ammar Ahmed
2022-07-08 23:53:00 +05:00
parent b422bc6016
commit 3631f59d4c

View File

@@ -178,6 +178,9 @@ export const useEditor = (
if (!note && id) {
currentNote.current = db.notes?.note(id).data as NoteType;
state.current?.onNoteCreated && state.current.onNoteCreated(id);
if (!noteData.title) {
postMessage(EditorEvents.titleplaceholder, currentNote.current.title);
}
}
if (useEditorStore.getState().currentEditingNote !== id && isDefaultEditor) {