Keep new note form cleared after create

This commit is contained in:
2026-03-29 03:36:01 +00:00
parent 602c275644
commit a5408ba8da
+1 -3
View File
@@ -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 });
} }