Skip to content

Commit

Permalink
Merge pull request #45 from bicienzu/patch-1
Browse files Browse the repository at this point in the history
Update VueTabs.js
  • Loading branch information
cristijora authored May 17, 2018
2 parents f3cf9a9 + c2858ac commit 4df45c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/VueTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4df45c3

Please sign in to comment.