trying to implement the Modal using Lightning:overLayLibrary as per this link lightningOverlayLibrary i am facing the below issue
Uncaught (in promise) TypeError: Cannot read property 'la' of undefined at Object.dispatchGlobalEvent (aura_prod.js:757) at a (lightning-overlay-utils.js:2) at new Promise (<anonymous>) at Promise.all.then.a
Component
<aura:component>
<lightning:button label="New REcord" name="modal" onclick="{!c.handleShowModal}"></lightning:button>
</aura:component>
controller.js
({
doInit : function(component, event, helper) {
},
handleShowModal: function(component, evt, helper) {
var matterid = component.get("v.recordId");
var modalBody;
$A.createComponent("c:demoPagecomponent", {},
function(content, status) {
if (status === "SUCCESS") {
modalBody = content;
alert(modalBody);
component.find('overlayLib').showCustomModal({
header: "Application Confirmation",
body: modalBody,
showCloseButton: true,
cssClass: "mymodal",
closeCallback: function() {
alert('You closed the alert!');
}
})
}
});
}
})
demoPagecomponent
<aura:component>
<div>
Hello
</div>
</aura:component>
component.find('overlayLib')
but I cannot find this attribute in your markup...