From e9509b9fa18cb2ac5cc1062114aa08b5aa56467b Mon Sep 17 00:00:00 2001 From: Nivedin <53208152+nivedin@users.noreply.github.com> Date: Fri, 25 Aug 2023 00:20:08 +0530 Subject: [PATCH] fix: tab right click rename bug (#3286) --- packages/hoppscotch-common/src/pages/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/hoppscotch-common/src/pages/index.vue b/packages/hoppscotch-common/src/pages/index.vue index 9754733dd..b44402f81 100644 --- a/packages/hoppscotch-common/src/pages/index.vue +++ b/packages/hoppscotch-common/src/pages/index.vue @@ -150,6 +150,7 @@ const showRenamingReqNameModal = ref(false) const reqName = ref("") const unsavedTabsCount = ref(0) const exceptedTabID = ref(null) +const renameTabID = ref(null) const t = useI18n() const toast = useToast() @@ -257,6 +258,7 @@ const openReqRenameModal = (tabID?: string) => { if (tabID) { const tab = getTabRef(tabID) reqName.value = tab.value.document.request.name + renameTabID.value = tabID } else { reqName.value = currentActiveTab.value.document.request.name } @@ -264,7 +266,7 @@ const openReqRenameModal = (tabID?: string) => { } const renameReqName = () => { - const tab = getTabRef(currentTabID.value) + const tab = getTabRef(renameTabID.value ?? currentTabID.value) if (tab.value) { tab.value.document.request.name = reqName.value updateTab(tab.value)