function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NKrishnaNKrishna 

lightning tabs dynamic

Hi All,

I have a custom lightning component, it has lightning tabs which are tab1,tab2.
I have a button on Tab1. If I click the button tab2 will open automatically.

Is it possible?

Please help me.
AbhishekAbhishek (Salesforce Developers) 
Hi Krishna,

I think it possible

https://rajvakati.com/2018/04/15/dynamically-creating-lightning-tabs/

https://salesforce.stackexchange.com/questions/154672/can-we-add-lightningtab-dynamically-in-the-component

Try the suggestions and code mentioned in the above blogs.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks.
NKrishnaNKrishna
@Abhishek - The links you shared are creating a new tabs. but in my case the tabs are already created, I want to know how to redirect one tab to another tab?.
navigating dynamic tabs created already
I have a lightning component has two lightning tabs using [lightning: tabset and lightning: tabs]. lightning tab1 has a button. Once I click the button from tab1, it will navigate to lightning tab2 using code.

Could you please help me.

Thanks.
AbhishekAbhishek (Salesforce Developers) 
Krishna Try this,

https://salesforce.stackexchange.com/questions/79678/apextabpanel-switch-tab-after-a-button-click

It will answer your query.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks.