Skip to content

Commit

Permalink
feat: update values on closing dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
krantheman committed Nov 26, 2024
1 parent f924401 commit 38b8e93
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/src/components/Modals/SendMail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,12 @@ const mail = reactive({ ...emptyMail })
watch(show, () => {
if (!show.value) {
mailID.value = null
Object.assign(mail, emptyMail)
if (mailID.value) {
if (isMailEmpty.value) deleteDraftMail.submit()
else updateDraftMail.submit()
mailID.value = null
Object.assign(mail, emptyMail)
}
return
}
Expand Down

0 comments on commit 38b8e93

Please sign in to comment.