Skip to content

Commit c2858ac

Browse files
authored
Update VueTabs.js
Fix issue #43
1 parent f3cf9a9 commit c2858ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/VueTabs.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ export default {
103103
},
104104
findTabAndActivate (tabNameOrIndex) {
105105
let indexToActivate = this.tabs.findIndex((tab, index) => tab.title === tabNameOrIndex || index === tabNameOrIndex)
106-
if (indexToActivate === this.activeTabIndex) return
106+
// if somehow activeTabIndex is not reflected in the actual vue-tab instance, set it.
107+
+ if (indexToActivate === this.activeTabIndex && !this.tabs[this.activeTabIndex].active) {
108+
+ this.tabs[this.activeTabIndex].active = true;
109+
+ }
107110
if (indexToActivate !== -1) {
108111
this.changeTab(this.activeTabIndex, indexToActivate)
109112
} else {

0 commit comments

Comments
 (0)