Tab Created

lightning:tabCreated

Fires when a Console workspace or subtab has been successfully created.

For Use In

Lightning Experience

lightning:tabCreated is an application event that indicates a tab has been created successfully. This event is supported in Lightning console apps only.

Handle the event using aura:handler.

1<aura:component implements="flexipage:availableForAllPageTypes" access="global">
2  <lightning:workspaceAPI aura:id="workspace" />
3  <aura:handler event="lightning:tabCreated" action="{! c.onTabCreated }" />
4</aura:component>

In your client-side controller, retrieve the ID of the new tab and set a label on the tab.

1({
2  onTabCreated: function (component, event, helper) {
3    var newTabId = event.getParam("tabId");
4    var workspace = component.find("workspace");
5    workspace.setTabLabel({
6      tabId: newTabId,
7      label: "New Tab",
8    });
9  },
10});

For more information, see the Salesforce Console Developer Guide.

Attributes 

NameDescriptionTypeDefaultRequired
tabIdThe newly created tab ID.stringYes