Hi I need some assistance for one of the scenario, i am trying to open a LWC from another LWC in which target LWC is Wrapped inside the aura component. the problem is that whenever user clicks new tab gets opened, is there any way if the tab is already open the user should navigate to the same tab. below is my code :
clickOnNext(evt) {
this[NavigationMixin.Navigate]({
type: 'standard__component',
attributes: {
componentName: 'c_ABCComponent'
},
state: {
c__ITC: this.ITCRe,
}
});
}
<aura:component implements='flexipage:availableForAllPageTypes,lightning:isUrlAddressable access:global'>
<lightning:workspaceAPI aura:id='WAPI'/>
<aura:handler name='init' value='{!this}' action='{!c.init}'/>
<c:AsdComponent3 />
</aura:component>
({
init: function (component, event, helper) {
let workspaceAPI = component.find('WAPI');
workspaceAPI.getEnclosingTabId().then((response) => {
let idOfOpne= response.tabId;
workspaceAPI.setTabLabel({
tabId: idOfOpne,
label: 'Loading This Tab'
});
})
)}