Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

disableUtilityPopOut() for Lightning Experience

Disables pop-out for a utility. This method isn’t supported for Lightning Web Components (LWC).

For LWC usage, see enablePopout().

Arguments

Name Type Description
utilityId string The ID of the utility to disable pop-out for. Optional when called within a utility.
disabled boolean

If true, disables pop-out and removes the pop-out icon for a utility that isn’t popped out. If the utility is already popped out, the pop-out icon is disabled.

If disabledText is provided, the pop-out icon isn’t removed, but it’s disabled.

disabledText string Hover text for the pop-out and pop-in icons if disabled is set to true. Optional.

Aura Components Sample Code

This component has a button that, when pressed, disables utility pop-out.

Component code:

1<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
2    <lightning:utilityBarAPI aura:id="utilitybar" />
3    <lightning:button label="Disable Utility Pop-Out" onclick="{! c.handleDisableUtilityPopOut }" />
4</aura:component>

Controller code:

1({
2    handleDisableUtilityPopOut : function(component, event, helper) {
3        var utilityAPI = component.find("utilitybar");
4        utilityAPI.disableUtilityPopOut({
5            disabled: true,
6            disabledText: "Pop-out is disabled"
7        });
8    }
9})

Response

This method returns a promise that, upon success, resolves to true.