0

I have a drop down box with a search box above it.

For example, if my drop down values are:

Apple
Banana
Pineapple

If I type apple in my search box, I expect the filter to show only Apple, but not both Apple and Pineapple. My code shows both Apple and Pineapple which I don't want.

Angular code:

<div class="form-inline">
    <div class="input-group">
        <input type="text" ng-model="itemSelectFilter" class="form-control">
        <div class="input-group-addon"><span class="glyphicon glyphicon-search"></span></div>
    </div>
</div>
<div class="list-group" id="itemSelectorList">
    <a ng-repeat="i in items | filter:{title:itemSelectFilter}" class="list-group-item">        
        {{i.title}}     
    </a>
</div>

Here 'title' is Fruits.title.

The Guest
  • 698
  • 11
  • 27

0 Answers0