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




Comments

Popular posts from this blog

Lightning Grid Custom Datatable

Comparing Two Values Using Aura If

Dynamic Standard Datatable Using Fieldset