Reputation: 1651
In my .html I've a to assign some value and a datalist with 2 option :
<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:
Upvotes: 0
Views: 4340
Reputation: 314
Datalist is not supported by all browsers and it is not handled the same way. I recommend you switch to something such as flexselect: https://rmm5t.github.io/jquery-flexselect/
You can find many other alternatives out there, but this is the one I use since it doesn't have any compatibility issues.
Upvotes: 0
Reputation: 11
It looks like a bug within MS Edge (Microsoft Edge 44.17763.1.0, Microsoft EdgeHTML 18.17763), I was able to reproduce it using the following steps:
Upvotes: 1