angular-filter
angular-filter copied to clipboard
Issue with filter by
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.
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