Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter on several attributes #65

Open
kyoshiro2708 opened this issue Jan 9, 2016 · 2 comments
Open

Filter on several attributes #65

kyoshiro2708 opened this issue Jan 9, 2016 · 2 comments

Comments

@kyoshiro2708
Copy link

Hi,

I would like to know if it is possible to filter not only on 1 attribute, but on several like :

       filterProperties: ['title','description']  // This doesn't work

So, if one of the 2 attributes contains what's in the textFilter, then it's kept in the list.

Thank you & kind regards

@uzumakinaruto123
Copy link

@kyoshiro2708 I am facing the problem ! Any lead ?

@vcyang
Copy link

vcyang commented Jan 18, 2016

@kyoshiro2708
If I'm right, it seems that you misunderstand the usage of filterProperties.

assume the user searches for "fish"

{name: 'fish', description: 'fish', color: 'blue'}

filterProperties: ['name', 'description'] ... The object will be matched and passed to the array in update
filterProperties: ['name', 'color'] ... The object will NOT be matched or passed to the array in update

So in your case, when you input 'abc', items will be considered matched only when BOTH of title and description contains 'abc'.

If you want to filter items by more than one attribute, use the comparator instead of filterProperties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants