I want the value in the input to filter the values in the dropdown, and ng-selected to be true for the option that has $index == 0.
When the filter takes action, the value in ng-selected changes to true and the selected property on the element does not change to selected="selected". If I remove the model, it works as intended.
<div ng-app ng-controller="AppCtrl" ng-init="sigStyles.companies = ['facebook', 'twitter', 'tumblr', 'myspace']">
<input type="text" ng-model="socialSearch"></input>
<select>
<option ng-repeat="company in sigStyles.companies | filter:socialSearch" value="{{company}}" ng-selected="{{$index === 0}}">{{company}}</option>
</select>
</div>
Does someone know how to get the selected property to change or does anyone know how to make a search input to remove options from a select based on its input?
Link to my fiddle here.