cmp
<aura:compomemt implements="lightning:utilityItem">
<!-- define popout to false -->
<aura:attribute name="supportsPopOut" type="Boolean" default="false" />
<!-- auto open utility bar when init -->
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<!-- use lightning:utilityBarAPI -->
<lightning:utilityBarAPI aura:id="utilitybar" />
someting else
</aura:compomemt>
controller.js
doInit: function(component) {
var utilityApi = component.find("utilitybar");
utilityApi.getAllUtilityInfo().then(fuction (response) {
if (typeof response != "undefined") {
utilityApi.openUtility();
}
});
}
No comments:
Post a Comment