option with hidden attribute not working in IE

一个人想着一个人 提交于 2021-01-28 12:45:42

问题


The following code should display dropdown with some options where first of them is only used as a dropdown's title - it's disabled and should not be present on the list of options. However it's not working in IE (working fine in Firefox), "Select value" is visible (but as disabled option) on the list.

<select>
 <option [ngValue]="undefined" hidden disabled>Select value</option>
 <option *ngFor="let value of values" [ngValue]="value">
   {{value}}
 </option>
</select>

来源:https://stackoverflow.com/questions/58862242/option-with-hidden-attribute-not-working-in-ie

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!