I have a similar problem, yet I'm using the lightningModal. I also checked the element and it does have the slds-modal. I would really appreciate any idea, or if you could point me out to my error.
from the modal component:
<template>
<lightning-modal-header label={header} ></lightning-modal-header>
<lightning-modal-body> Content: {content} </lightning-modal-body>
<lightning-modal-footer>
<lightning-button
label="Close"
onclick={handleClose}
></lightning-button>
</lightning-modal-footer>
</template>
The class:
import {api} from 'lwc';
import LightningModal from 'lightning/modal';
export default class IntegrityCheckerModalPage extends LightningModal {
@api header ='my header';
@api content = 'my content';
// Return a custom value when the modal is closed with the Close button.
// If no value is returned in the close method, then undefined is returned(Same as closing with the X button).
handleClose() {
this.close('return value');
}
}
The datamodel's code:
The import:
import IntegrityCheckerModalPage from 'c/integrityCheckerModalPage';
The event of the row action:
case 'moreInfo': IntegrityCheckerModalPage.open({ label : 'hello label', role : 'dialog', size: 'medium', description: 'MiscModal displays the message in a popup', header: 'header example ' , content: 'my content' }).then((result) => { console.log('Modal returned:' + result); });
break;
I would appreciate any input. I tried disabling the 'Lightning Web Security' and reduce the api version of the 'Lightning Locker API Version' but it didn't change anything.
This is how it looks like...