When I create a modal window with a content to be displayed with fxLayoutGap and the grid option, the height of the content area of the dialog is not calculated correctly. Instead of enlarging the dialog box, an overflow occurs.
Stackblitz: https://stackblitz.com/edit/angular-material-jror5h
Code of the Modal Component:
<mat-dialog-content class="mat-typography">
<div fxLayout="row wrap" fxLayoutAlign="start start" fxLayoutGap="20px grid">
<div fxFlex="33.3">
<mat-form-field appearance="outline">
<mat-label>FormControl 1</mat-label>
<input matInput placeholder="FormControl 1" type="text">
</mat-form-field>
</div>
<div fxFlex="66.7">
<mat-form-field appearance="outline">
<mat-label>FormControl 2</mat-label>
<input matInput placeholder="FormControl 2" type="text">
</mat-form-field>
</div>
<div fxFlex="33.3">
<mat-form-field appearance="outline">
<mat-label>FormControl 3</mat-label>
<mat-select>
<mat-option [value]="true">yes</mat-option>
<mat-option [value]="false">no</mat-option>
</mat-select>
</mat-form-field>
</div>
<div fxFlex="33.3">
<mat-form-field appearance="outline">
<mat-label>FormControl 4</mat-label>
<input matInput placeholder="FormControl 4" type="text">
</mat-form-field>
</div>
<div fxFlex="33.3">
<mat-form-field appearance="outline">
<mat-label>FormControl 4</mat-label>
<input matInput placeholder="FormControl 4" type="text">
</mat-form-field>
</div>
<div fxFlex="50">
<mat-form-field appearance="outline" style="width: 100%">
<mat-label>FormControl 5</mat-label>
<input matInput placeholder="FormControl 5" type="text">
</mat-form-field>
</div>
<div fxFlex="50">
<mat-form-field appearance="outline">
<mat-label>FormControl 6</mat-label>
<input matInput placeholder="FormControl 4" type="text">
</mat-form-field>
</div>
</div>
</mat-dialog-content>
The rendered Modal Component:
How can the problem be solved without specifying a fixed height for mat-dialog-content?