Answer the question
In order to leave comments, you need to log in
Why is select buggy in angular when choosing?
Hello! When selecting some items from the list, a completely different one is selected. Let's say we chose "Thickness 4-6" all the rules, "Thickness 8" all the rules, etc. , but when we select "Thickness 15-19" "Thickness 12" or another one is selected. As a result select works chaotically. I can't understand why this is happening.
Here is the link plnkr.co/edit/5F7nWMOHafIp9GNucqwD?p=preview , click select and see this glitch.
Answer the question
In order to leave comments, you need to log in
The problem is in the following place:
<select ... ng-options="value.price as value.name group by value.group for value in holes" ...>
...
value.price as value.name
, and this is a non-unique parameter. As a result, when choosing an item, the last element is selected, for which the specified price is equal to the selected value. value.price as value.name
with value.id as value.name
. $('select').val(190);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question