I have a search box with a ng-model assigned to it:

<input type="text" class="form-control" placeholder="Search" ng-model="searchLibrary.text">

And a ng-repeat with a filter searchLibrary.text

<div ng-repeat="w in items | filter:searchLibrary.text" on-item-removed="onItemRemoved(item)">

So, when the user enters something, the filter removes all non-matching elements from the array, but is there a way to hide non-matching elements instead of removing them?

The reason why removing elements is problematic is I have a callback method assigned to the ng-repeat which gets called when a item is removed but it gets triggered when a user searches for some item which isn't the correct behaviour.

Edit: All the elements in the items array are draggable, so the user can manually drag and drop items from panel A to panel B. The callback is triggered when an item gets removed, but it shouldn't get triggered when user searches for a item description.

Any help is much appreciated.