Dailycode.info

Short solution for short problems

AngularJS : Smart table select search not working in IE 11

I was building a web site and testing it in Chrome. Worked fine. Untill the users started testing in IE!! There the filtering in the table using dropdowns (select) didn't work. After some looking around I found out that the smarttable was binding to the input event. But IE only fires the change event with select. So the binding didn't work. The smarttable version 2.1.8 has an option to bind the search to another event:

<select st-input-event="change" st-search="Month" class="form-control">
    <option value="">All</option>
    <option ng-repeat="row in vm.filteredConsignments | unique:'Month'" value="{{row.Month}}">{{row.Month}}</option>
</select>

The st-input-event attribute allows you to change the binding. Now it can work with the change event, it still works in Chrome, but now also in IE (in my case IE11).





blog comments powered by Disqus