angular - Datalist not displaying properly in Edge and IE11
问题描述
In my .html I've a to assign some value and a datalist with 2 option :
- The first : to take the value of my input
- The second : where I *ngFor a list of values.
<input autoComplete="off"
type="text"
(change)="methodWhenIChangeMyValue()">
<datalist id="{{row.MYOBJECT}}">
<option value="{{value}}">{{value}}</option>
<option *ngFor="let i of arrayToParse[row.MYOBJECT]" value="{{i.MYOBJECTID}}">
{{i.MYOBJECTID}}</option>
</datalist>
</input>
In Firefox and Chrome my list displays normally, but in Edge/IE11 only one element is displayed. All data are loaded, but I need to navigate inside my option to show them. Finally, when I've all my element (after a navigation) if I search an element more specific a grey block is displayed. How can I fix this ?
All my actions for < input > are not refered inside this snippet.
Only one element is displayed at the beginning:
A grey block is displayed when I search a more specific value:
解决方案
它看起来像 MS Edge 中的一个错误(Microsoft Edge 44.17763.1.0,Microsoft EdgeHTML 18.17763),我能够使用以下步骤重现它:
- 启动以下演示:https ://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist
- 在“选择你的口味”输入中一个字母一个字母地输入“巧克力”这个词,然后一个一个地删除所有字符,直到一个字母都没有。出现的是输入下方的损坏数据列表,如上面的屏幕截图。
推荐阅读
- python - 张量流无效符号
- python-3.x - 使用 CSS 选择器在 BeautifulSoup find_all 方法中返回的空对象
- ui-grid - 数据刷新后的角度 ui-grid 过滤
- .net - Appsettings.json 不同的版本?
- javascript - 如何检查用户是否在 AWS Amplify 中被确认?
- javascript - Bot 框架范围 beginDialogAction
- html - 覆盖 * scss 页面中的 CSS 属性
- reactjs - 实施redux-persist后反应本机应用程序保持空白?
- java - 现有 Camel REST 端点的 OAuth2
- c# - 在 XXX 上没有可以接受消息的端点监听。这通常是由不正确的地址或 SOAP 操作引起的