我有一個從md-select中選擇的值,但md-select中的「箭頭」在選擇後仍然顯示。Angular2 md-select選擇選項後刪除箭頭
HTML
<div class="form-group spaces" style="width: 50%">
<md-select placeholder="Claim Type" name="selectedClaimType"
ngDefaultControl formControlName="selectedClaimType"
[(ngModel)]="selectedClaimType" [formControl]="claimType" >
<md-option *ngFor="let c of ClaimTypes"
[value]="c.ClaimTypeId">{{c.ClaimDescription}}</md-option>
</md-select>
</div>
試圖通過CSS在墊選但無濟於事修正寬度。
請參閱attached..any建議高度讚賞
添加渲染HTML代碼
<md-select class="mat-select ng-tns-c2-1 mat-primary ng-valid ng-dirty ng-
touched" formcontrolname="selectedClaimType" name="selectedClaimType"
ngdefaultcontrol="" placeholder="Type" role="listbox" tabindex="0"
aria-label="Claim Type" aria-labelledby="" aria-required="false"
aria-disabled="false" aria-invalid="false" aria-owns="md-option-0
md-option-1 md-option-2">
<div class="mat-select-trigger" cdk-overlay-origin="">
<span class="mat-select-placeholder ng-trigger
ng-trigger-transformPlaceholder mat-floating-placeholder"
style="opacity: 1; width: 99px; top: -22px; left: -2px;
transform: scale(0.75);">Type </span><!---->
<span class="mat-select-value ng-tns-c2-1">
<span class="mat-select-value-text">High Voltage Battery</span> </span>
<span class="mat-select-arrow"></span>
<span class="mat-select-underline"></span></div><!---->
</md-select>
可以共享渲染HTML代碼? –
我認爲箭頭表示您可以重新選擇當前選擇。如果你不想要這個,你可以在選擇後用另一個元素替換md-select,例如格或跨度。 –
@MaheswaranS - 已添加html代碼 –