angularUtils icon indicating copy to clipboard operation
angularUtils copied to clipboard

Multiple filters

Open SacrilegeTx opened this issue 9 years ago • 4 comments

Can someone help to apply than more one filter to my page? I tried to use | filter: contractor | filter: contracting | filter: collaborator but it causes some troubles between then when I made the search.

I hope can help me.

Sorry for my bad english.

SacrilegeTx avatar Aug 03 '16 22:08 SacrilegeTx

What is the expected result?

What is the actual result?

Include your code. Without the above information, I cannot help. Your English is fine, by the way :)

michaelbromley avatar Aug 04 '16 07:08 michaelbromley

Ok, I have three fields http://puu.sh/qpEpy/ff399d7b3b.png I need every field made its own search. For example. Field: Contractor; only contractor's name search and so on.

Now when I tried: <tr dir-paginate="t in tray | filter: searchTray.PersonName | orderBy: sort | itemsPerPage: pageSize" current-page="currentPage">

That filter only makes search by Person's name. And when I add the others filters | filter: contractor | filter: contracting the search in every field is the same way, in this case: Person's name. That's the reason to I want to know how to made every field have its own search.

SacrilegeTx avatar Aug 04 '16 15:08 SacrilegeTx

Okay. Have you read this page: https://docs.angularjs.org/api/ng/filter/filter?

These docs provide a way to filter by multiple keys. See the example at the bottom of the page. I'm not yet sure if this issue is specific to my library, or whether it is a general AngularJS issue.

Does the filtering work if you just use an ng-repeat rather than the paginate directive?

michaelbromley avatar Aug 04 '16 15:08 michaelbromley

How would I do multiple filters with one/two of them being a date range. example: Start date and end date.

costellos2010 avatar Aug 17 '16 20:08 costellos2010