Standard Lightning tab events in the console

Lightning Experience is based on event-driven architecture. When a tab is focused, closed, or opened, there are standard handlers that Salesforce provides, which a component can handle.

The following table lists some of the events provided out of the box in the console API to detect changes to the tabs:

Event name Component markup to handle events Controller action on event handlers
Lightning :tabClosed <aura:component implements="flexipage:availableForAllPageTypes" access="global" > <aura:handler event="Lightning :tabClosed" action="{! c.onTabClosed }"/> </aura:component> ({ onTabClosed : function(component, event, helper) { var tabId = event.getParam('tabId'); console.log("Tab closed: " ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.