角度6的垫选择选项行为不适用于整个应用程序。
<div fxLayout="row wrap" fxLayoutAlign="start stretch" fxShow="true" fxHide="false" *ngIf="showbuyer">
<mat-form-field floatLabel="never" class="removeselect">
<mat-select placeholder="Buyer" floatLabel="never" (selectionChange)="buyerChange()" [(ngModel)]="buyerK">
<mat-option *ngFor="let buyer of buyers;" [value]="buyer?.userKey">{{buyer?.userName}}</mat-option>
</mat-select>
</mat-form-field>
</div>
答案 0 :(得分:0)
I removed override select CSS, now it is working
if we want to apply any CSS class to <mat-select> we should use
disableOptionCentering="" panelClass="custompanel" to <mat-select>
<mat-form-field floatLabel="never">
<mat-select disableOptionCentering="" panelClass="custompanel" [(ngModel)]="typeAuction">
<mat-option *ngFor="let auction of Typeauctions; " [value]="auction">{{auction}}</mat-option>
</mat-select>
</mat-form-field>
For CSS
.custompanel{
margin-top:64px;
}