OverLay
OverLay.cmp
<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId">
<lightning:overlayLibrary aura:id="overlayLib"/>
<lightning:button variant="brand" value="Create Modal" label="Show Modal" onclick="{!c.handleShowModal}"/>
{!v.body}
</aura:component>
OverLay.Js
({
handleShowModal : function(component, event, helper) {
component.find('overlayLib').showCustomModal({
header: "Application Confirmation",
body: 'This is Test',
footer: 'Footer',
showCloseButton: true,
closeCallback: function() {
alert('You closed the alert!');
}
});
},
})
O/P
Note: The component should be added to record page
flexipage:availableForAllPageTypes
OverLay.cmp
<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId">
<lightning:overlayLibrary aura:id="overlayLib"/>
<lightning:button variant="brand" value="Create Modal" label="Show Modal" onclick="{!c.handleShowModal}"/>
{!v.body}
</aura:component>
OverLay.Js
({
handleShowModal : function(component, event, helper) {
component.find('overlayLib').showCustomModal({
header: "Application Confirmation",
body: 'This is Test',
footer: 'Footer',
showCloseButton: true,
closeCallback: function() {
alert('You closed the alert!');
}
});
},
})
O/P
Note: The component should be added to record page
flexipage:availableForAllPageTypes
Comments
Post a Comment