ngx-modal icon indicating copy to clipboard operation
ngx-modal copied to clipboard

How to specify dialog width and height?

Open shansubra opened this issue 6 years ago • 3 comments

Is there any option available to specify the width and height of the dialog?

shansubra avatar Nov 16 '18 21:11 shansubra

I need this option too. Anything about that? Aparently, styles via CCS (.modal-dialog, .modal-body) are not taken into account, I don't know why

giordanni612 avatar Jan 24 '19 18:01 giordanni612

Is there any update on this? Has anyone found a solution?

PinkTiu avatar Jul 31 '19 18:07 PinkTiu

I solved it like this: In css: .modal-xl { width: 1100px; } .modal-header { padding: 0; } .modal-fit.modal-body { overflow-y: auto; max-height: calc(100vh - 140px); }

In MyModal.ts: dialogInit(reference: ComponentRef<IModalDialog>, options: Partial<IModalDialogOptions>) { options.settings = {}; options.settings.modalDialogClass = 'modal-dialog modal-dialog-centered modal-xl'; options.settings.bodyClass = 'modal-body p-0'; }

In MyModal.html: div class="modal-body modal-fit" ... div

*I have to remove < in html section since blog omitted it

giordanni612 avatar Aug 01 '19 13:08 giordanni612