angular-filter icon indicating copy to clipboard operation
angular-filter copied to clipboard

Issue with filter by

Open mattstobber opened this issue 8 years ago • 1 comments

I have the following code: <li ng-repeat="subItem in vm.FAAFreqs | filterBy:['Incident.IncidentName'] : item.Incident.IncidentName" ui-tree-node>

I have 2 incidents named "Incident1" and "Incident10". The filtering is causing Incident10 to appear twice, so I can only assume that the filterBy finds Incident1 inside of Incident10 and thinks it is a match and doesn't finish the entire search.

The problem resolves 100% if I change the name of Incident10 to anything else.

mattstobber avatar May 24 '16 07:05 mattstobber

Documentation is outdated. Looking at the source there is a third parameter that seems to be what you need.

Usage: collection | filterBy:[prop, nested.prop, etc..]:search:strict Source: filter-by.js

Badisi avatar Jun 27 '16 14:06 Badisi