Newer Version Available
disableUtilityPopOut() for Lightning Experience
Disables pop-out for a utility.
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. |
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.disableUtilityPopOut }" />
4</aura:component>Controller code:
1({
2 disableUtilityPopOut : 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.