简体   繁体   中英

Angular mat-select not working in safari browser

Angular 6 mat-select option behavior not working for the whole application.

 <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>
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;
            }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM