I'm new to AngularJS. I followed this post angularjs-ng-options-with-group and added data-live-search.
This is my json
{"Type":"Orange","NSX":"Group1"},
{"Type":"Apple","NSX":"Group1"},
{"Type":"Grape","NSX":"Group1"},
{"Type":"Flower","NSX":"Group2"}
My html:
<select data-live-search="true" data-live-search-style="startsWith"
ng-model="val" class="selectpicker"
ng-options="x.Type group by x.NSX for x in Farm">
</select>
Image My select menu:
The problem is when I choose Orange then the output is Apple. I choose Apple the output is Grape. I choose Grape, the output is Flower.
I remove class="selectpicker"
, it works fine, but there is no searching in select menu.
Is there any solution for this or alternative?