Newer Version Available
focusTab() for Lightning Experience
Focuses a workspace tab or subtab. This method works only in
Lightning console apps.
Arguments
| Name | Type | Description |
|---|---|---|
| tabId | string | ID of the workspace tab or subtab on which to focus. |
Sample Code
This component has a button that, when pressed, opens a new tab and focuses it.
Component code:
Controller code:
Response
This method returns a promise that, upon success, resolves to true.