Newer Version Available
isSubtab() for Lightning Experience
Checks whether a tab is a subtab. This method works only in
Lightning console apps.
Arguments
| Name | Type | Description |
|---|---|---|
| tabId | string | ID of the tab. |
Sample Code
This component has a button that checks whether the foucsed tab is a subtab and opens a modal with the answer.
Component code:
Controller code:
Response
This method returns a promise that, upon success, resolves to
true if the tab is a subtab, and false otherwise.