The custom filter:searchFilter working fine in normal html here is the demo http://codepen.io/anon/pen/Oyydxa on the other hand the same function doesn’t working in ionic framework.
<input type="search" placeholder="Search" ng-model="filterName">
<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="leaf in leafs | filter:searchFilter" type="item-text-wrap" href="#/tab/leafs/{{leaf.id}}">
filter
$scope.searchFilter = function(obj) {
var re = new RegExp($scope.filterName, 'i');
return !$scope.filterName || re.test(obj.botanical_name) || re.test(obj.en_names) || re.test(obj.ml_names);
};
ionic demo http://codepen.io/anon/pen/pjjGWo
Unfortunately the console.log($scope.filterName) seems to me as empty. Is there any solution to fix this bug ?