From 534a920106d2ce9bd934c186079f162411bdede5 Mon Sep 17 00:00:00 2001 From: Lera24 Date: Tue, 19 Mar 2024 12:33:54 +0200 Subject: [PATCH] fix: finding current Tab[WTEL-4296] --- .../components/opened-contact-communications.vue | 11 +---------- .../contacts/components/opened-contact-tabs.vue | 13 +------------ 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/modules/contacts/components/opened-contact-communications.vue b/src/modules/contacts/components/opened-contact-communications.vue index 73ac50a2..7bbf2638 100644 --- a/src/modules/contacts/components/opened-contact-communications.vue +++ b/src/modules/contacts/components/opened-contact-communications.vue @@ -69,21 +69,12 @@ const tabs = computed(() => [ }, ]); -const currentTab = ref({}); +const currentTab = computed(() => tabs.value.find(({ pathName }) => pathName === route.name)) function changeTab(tab) { - currentTab.value = tab; return router.push({ name: tab.pathName }); } -function initializeCommunicationsTab() { - currentTab.value = tabs.value.find(({ pathName }) => pathName === route.name) -} - -onMounted(() => { - initializeCommunicationsTab(); -}); -