From b41b3ea2fd099229415d322716bebbeaf11e6b69 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 1 Feb 2024 12:55:12 +0100 Subject: [PATCH] Fix: Clear editor after saving new transaction Signed-off-by: Knut Ahlers --- frontend/components/txEditor.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/components/txEditor.vue b/frontend/components/txEditor.vue index 963d51d..5599706 100644 --- a/frontend/components/txEditor.vue +++ b/frontend/components/txEditor.vue @@ -124,6 +124,21 @@ export default { .then(() => { this.$emit('editSaved') }) + .then(() => { + if (!this.edit) { + this.form = { + amount: 0, + category: '', + cleared: false, + date: new Date().toISOString() + .split('T')[0], + + description: '', + payee: '', + } + this.$refs.date.focus() + } + }) }, sendCancel() {