I am trying to add a Lightning Tab component to several custom Lightning Community pages and have the corresponding tab highlighted for the page it is on. Example: If I I am on the Home page I want the Home tab to be highlighted, if I am on the Overview page I want the Overview tab highlighted and so on.
For a lightning:tabset where do I specify the href for the corresponding page for each tab?
Component:
<aura:component implements="forceCommunity:availableForAllPageTypes" access="global">
<div class="demo-only" style="height:10rem">
<lightning:tabset>
<lightning:tab label="1st tab" onactive="{!c.loadFirstTab}" id="One">
</lightning:tab>
<lightning:tab label="2nd tab" onactive="{!c.loadSecondTab}" id="Two">
</lightning:tab>
</lightning:tabset>
</div>
JS:
({
loadFirstTab : function(component, event, helper) {
// do whatever you want
},
loadSecondTab : function(component, event, helper) {
// do whatever you want
},
selectedTab : function(component, event, helper) {
component.find("tabSet").set("v.selectedTabId", tabId);
},
})