Newer Version Available
lightning:tabFocused
Response
| Name | Type | Description |
|---|---|---|
| previousTabId | string | The ID of the previously focused tab. |
| currentTabId | string | The ID of the currently focused tab. |
Example
This example prints a line to the browser’s developer console when a tab is focused, and then returns that tab’s tabInfo object using the getTabInfo() method.
Component code:
Controller code: