I have a <select>
populated via ng-options
. In a specific case, when two values are adjacent in the ordered model list and the values have the same first letter, the updating of the model value in angular breaks. This may be a browser event issue but I'm not certain.
This plunker shows the issue and this GIF illustrates it.
I've tried triggering the change
event on the field manually without any luck. We would like to keep the list in alphabetical order if possible - changing the order seems to stop the issue.
The issue appears only in Chrome - I'm using Version 43.0.2357.81 (64-bit).
Any ideas would be appreciated. Thanks.
This is a hack solution and it's ugly but it works.
<select ng-model="workflowData.section" ng-options="s.name as s.name for s in sections" class="fullwidth" ng-keypress="workflowData.section = s.name">
</select>
I honestly don't know why the original code didn't work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With