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:
<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
<lightning:utilityBarAPI aura:id="utilitybar" />
<lightning:button label="Disable Utility Pop-Out" onclick="{! c.handleDisableUtilityPopOut }" />
</aura:component>
Controller code:
({
handleDisableUtilityPopOut : function(component, event, helper) {
var utilityAPI = component.find("utilitybar");
utilityAPI.disableUtilityPopOut({
disabled: true,
disabledText: "Pop-out is disabled"
});
}
})
Response
This method returns a promise that, upon success, resolves
to true.