Skip to content

Commit

Permalink
Add activeTabIndex property to Tabs
Browse files Browse the repository at this point in the history
Add activeTabIndex to component and refresh it in selectTab method
  • Loading branch information
matewiszt authored Mar 30, 2018
1 parent 4c4a155 commit cd6e259
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
data: () => ({
tabs: [],
activeTabHash: '',
activeTabIndex 0,
}),
computed: {
Expand Down Expand Up @@ -105,6 +106,7 @@
this.$emit('changed', { tab: selectedTab });
this.activeTabHash = selectedTab.hash;
this.activeTabIndex = this.getTabIndex(selectedTabHash);
expiringStorage.set(this.storageKey, selectedTab.hash, this.cacheLifetime);
},
Expand Down

0 comments on commit cd6e259

Please sign in to comment.