Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

lightning:tabRefreshed

Indicates that a tab has been refreshed.

Response

Name Type Description
tabId string The ID of the refreshed tab.

Example

This example prints a line to the browser’s developer console when a tab is refreshed, and then returns that tab’s tabInfo object using the getTabInfo() method.

Component code:

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

Controller code:

1({
2       onTabRefreshed : function(component, event, helper) {
3           console.log("Tab Refreshed");
4           var refreshedTabId = event.getParam("tabId");
5           var workspaceAPI = component.find("workspace");
6           workspaceAPI.getTabInfo({
7                tabId : refreshedTabId
8           }).then(function(response) {
9                console.log(response);    
10           });
11       }
12    })