angular / angular/components

Setting dialog max-height does not work

Offen
#8,493 18 Kommentare 13 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area: material/dialog P3
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

#### Bug, feature request, or proposal:
Bug

#### What is the expected behavior?
To be able to change the max-height of the dialog

#### What is the current behavior?
It does not work.

#### What are the steps to reproduce?
http://plnkr.co/edit/X17ETao12PtHTKmpqV5s?p=preview
The dialog in question is configured to be
```
const settings: MatDialogConfig = {
maxWidth: '99vw',
maxHeight: '99vh'
}
```
But the height is the default one. It seems that the `cdk-overlay-0` is correctly styled with `style="max-width: 99vw; max-height: 99vh;"` but the inner `div.mat-dialog-content` has `max-height: 65vh;` which dictates the height.

All the relevant code is in `app.component.ts`.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
All / latest

#### Is there anything else we should know?
Keep up the good work!

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit app.component.ts und der verknüpften Plunker-Reproduktion, bei der MatDialogConfig maxWidth und maxHeight setzt, während das innere mat-dialog-content weiterhin auf 65vh begrenzt ist. Bestätige die Höhenbeschränkung und betrachte das Issue als abgeschlossen, wenn der Dialog die konfigurierte max-height einhält.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.