Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify dialog width and height? #46

Open
shansubra opened this issue Nov 16, 2018 · 3 comments
Open

How to specify dialog width and height? #46

shansubra opened this issue Nov 16, 2018 · 3 comments

Comments

@shansubra
Copy link

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

@giordanni612
Copy link

giordanni612 commented Jan 24, 2019

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

@PinkTiu
Copy link

PinkTiu commented Jul 31, 2019

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

@giordanni612
Copy link

giordanni612 commented Aug 1, 2019

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, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants