From 401710c3bd83ae2b0702b23753e80e0afd36f4c2 Mon Sep 17 00:00:00 2001 From: mohit-nagaraj Date: Tue, 8 Oct 2024 07:01:49 +0530 Subject: [PATCH] fix(app): Fix proxy modal test --- src/components/ProxyDialog.vue | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/components/ProxyDialog.vue b/src/components/ProxyDialog.vue index fc92359b9..62eb6f2bc 100644 --- a/src/components/ProxyDialog.vue +++ b/src/components/ProxyDialog.vue @@ -130,6 +130,27 @@ export default { this.modal = new Modal(this.$refs.modal); }, + beforeRouteLeave(to, from, next) { + if (this.modal) { + this.modal.hide(); + } + next(); + }, + + watch: { + $route(to, from) { + if (this.modal) { + this.modal.hide(); + } + } + }, + + beforeUnmount() { + if (this.modal) { + this.modal.dispose(); + } + }, + methods: { /** * Show dialog to confirm deletion