From c2858acf5fbbcef0b135b78f8f1bed2e1d9a5898 Mon Sep 17 00:00:00 2001 From: bicienzu Date: Thu, 3 May 2018 13:08:11 +0200 Subject: [PATCH] Update VueTabs.js Fix issue https://github.com/cristijora/vue-tabs/issues/43 --- src/components/VueTabs.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/VueTabs.js b/src/components/VueTabs.js index 5ef6479..d48c21c 100644 --- a/src/components/VueTabs.js +++ b/src/components/VueTabs.js @@ -103,7 +103,10 @@ export default { }, findTabAndActivate (tabNameOrIndex) { let indexToActivate = this.tabs.findIndex((tab, index) => tab.title === tabNameOrIndex || index === tabNameOrIndex) - if (indexToActivate === this.activeTabIndex) return + // if somehow activeTabIndex is not reflected in the actual vue-tab instance, set it. ++ if (indexToActivate === this.activeTabIndex && !this.tabs[this.activeTabIndex].active) { ++ this.tabs[this.activeTabIndex].active = true; ++ } if (indexToActivate !== -1) { this.changeTab(this.activeTabIndex, indexToActivate) } else {