From fb1695a243ea5758926394e2581c9eab14d4f543 Mon Sep 17 00:00:00 2001 From: danielfreiremendesottoworks Date: Thu, 13 Jun 2024 14:40:54 +0200 Subject: [PATCH] adds watch and removes click event --- frontend/src/components/BackupEditDialog.vue | 16 ++++++++++------ frontend/src/components/BackupViewDialog.vue | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/BackupEditDialog.vue b/frontend/src/components/BackupEditDialog.vue index b7afdc1..0ae7cbc 100644 --- a/frontend/src/components/BackupEditDialog.vue +++ b/frontend/src/components/BackupEditDialog.vue @@ -93,10 +93,14 @@ const integerRequiredRule = (fieldName: string) => { return (v: number) => (!!v && v > 0) || `${fieldName} is required and must be bigger than 0`; }; -const closeDialog = () => { - viewDialog.value = false; - emits('close'); -}; +watch( + () => viewDialog.value, + (value) => { + if (!value) { + emits('close'); + } + }, +); watch( () => props.id, @@ -108,7 +112,7 @@ watch(