From 8a6560228cfc5c91bd8c39a6d488776b415e2a24 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 1 Oct 2024 18:22:18 +0530 Subject: [PATCH] fix: preserve last visited tab not working in mobile view --- frontend/src/pages/Deal.vue | 2 +- frontend/src/pages/MobileDeal.vue | 5 +++-- frontend/src/pages/MobileLead.vue | 5 ++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/Deal.vue b/frontend/src/pages/Deal.vue index 7ea89b653..95caf0c43 100644 --- a/frontend/src/pages/Deal.vue +++ b/frontend/src/pages/Deal.vue @@ -36,7 +36,7 @@
- + { return items }) -const tabIndex = ref(0) const tabs = computed(() => { let tabOptions = [ { @@ -476,6 +476,7 @@ const tabs = computed(() => { ] return tabOptions.filter((tab) => (tab.condition ? tab.condition() : true)) }) +const { tabIndex } = useActiveTabManager(tabs, 'lastDealTab') const fieldsLayout = createResource({ url: 'crm.api.doc.get_sidebar_fields', diff --git a/frontend/src/pages/MobileLead.vue b/frontend/src/pages/MobileLead.vue index 3ed477bb1..47e045d2c 100644 --- a/frontend/src/pages/MobileLead.vue +++ b/frontend/src/pages/MobileLead.vue @@ -89,7 +89,6 @@ { return items }) -const tabIndex = ref(0) - const tabs = computed(() => { let tabOptions = [ { @@ -388,6 +386,7 @@ const tabs = computed(() => { ] return tabOptions.filter((tab) => (tab.condition ? tab.condition() : true)) }) +const { tabIndex } = useActiveTabManager(tabs, 'lastLeadTab') watch(tabs, (value) => { if (value && route.params.tabName) {