Keep new note form cleared after create
This commit is contained in:
@@ -948,10 +948,8 @@
|
|||||||
const record = await pb.collection(NOTES_COLLECTION).create(payload);
|
const record = await pb.collection(NOTES_COLLECTION).create(payload);
|
||||||
const uploaded = await uploadPendingAttachments(record.id);
|
const uploaded = await uploadPendingAttachments(record.id);
|
||||||
await loadNotes();
|
await loadNotes();
|
||||||
const refreshed = allNotes.find((n) => n.id === record.id) || record;
|
clearForm();
|
||||||
selectNote(refreshed);
|
|
||||||
renderList();
|
renderList();
|
||||||
await renderSelectedAttachments();
|
|
||||||
writeOutput({ message: 'Note created', id: record.id, attachmentsUploaded: uploaded.length });
|
writeOutput({ message: 'Note created', id: record.id, attachmentsUploaded: uploaded.length });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user