I need help programmatically changing Carbon/vue tabs. In the 1st tab (0), I want to be able click a button and bring the user to the 4th tab (3). In the template section I have the following:
<cv-tabs selected="1" aria-label="Tab navigation" ref="tabs" id="nav-tab">
<cv-tab label="GETTING STARTED">
...
<cv-button @click="changeTab">Go to JRS Navigator</cv-button>
</cv-tab>
<cv-tab label="TAXONOMY BASICS">
...
</cv-tab>
<cv-tab label="MANAGER GUIDANCE">
...
</cv-tab>
<cv-tab label="JRS NAVIGATOR">
... where I want the button to take me ...
</cv-tab>
</cv-tabs>
In the methods section, I define changeTab(). This pulls the cv-tabs VueComponent based on the ref="tabs", setting selected(3) does NOT switch the tabs, it only changes the selected tab to be the 4th tab (3) JRS NAVIGATOR (I.e., 4th tab has the blue bar under it), but the tab’s content is still the first tab (GETTING STARTED).
methods: {
changeTab(){
this.$refs.tabs.selected(3)
},
...
}
Any ideas?