Newer Version Available
lightning:tabUpdated
Response
| Name | Type | Description |
|---|---|---|
| tabId | string | The ID of the updated tab. |
Example
This example prints a line to the browser’s developer console when a tab is updated, and then prints that tab’s tabId.
Component code:
1<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
2 <lightning:workspaceAPI aura:id="workspace" />
3 <aura:handler event="lightning:tabUpdated" action="{! c.onTabUpdated }"/>
4</aura:component>Controller code:
1({
2 onTabUpdated : function(component, event, helper) {
3 console.log("Tab Updated");
4 var updatedTabId = event.getParam("tabId");
5 console.log(updatedTabId);
6 },
7})