Newer Version Available

This content describes an older version of this product. View Latest

isSubtab() for Lightning Experience

Checks whether a tab is a subtab. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC).

To check whether a tab is a subtab in LWC, use getTabInfo().

Arguments

Name Type Description
tabId string ID of the tab.

Aura Components Sample Code

This component has a button that checks whether the focused 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.