diff --git a/src/molecules/tabs/Tabs.js b/src/molecules/tabs/Tabs.js index d821ed9e..8589fa5b 100644 --- a/src/molecules/tabs/Tabs.js +++ b/src/molecules/tabs/Tabs.js @@ -48,11 +48,14 @@ export default { methods: { selectTab (selectedTab) { this.$emit('click', selectedTab.name) - this.tabs.forEach(tab => { + this.tabs.forEach((tab, index) => { if (selectedTab === this.activeFocusedTab) { tab.isActive = tab.name === this.tabs[this.activeFocusedTab].name + } else if (tab.name === selectedTab.name) { + tab.isActive = true + this.activeFocusedTab = index } else { - tab.isActive = tab.name === selectedTab.name + tab.isActive = false } }) },