Ionic 4 Modal dynamic height

Hi @D4rkMindz did you ever find an answer to this ruthlessly closed GitHub issue you raised? We are running into the same issue on a current project. Any light you might be able to shed on it might be helpful.

Did you take a look at this thread ?

2 Likes

Thanks that’s terrific.

create model like this
async viewPaySlip() {
const modal = await this.modalCtrl.create({
component: PayslipviewPage,
cssClass: 'my-custom-modal-css1’
});
return await modal.present();
}

use this scss inside your app.scss file

.my-custom-modal-css .modal-wrapper {
height: 50%;
width: 80%;
top: 20%;
padding: 10%;
position: absolute;
display: block;
border-radius: 2%;
}

cheers!!

You are assigning an Height here. that is not dynamic :frowning:

3 Likes