Filter on several attributes
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
@kyoshiro2708 I am facing the problem ! Any lead ?
@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
updatefilterProperties: ['name', 'color'] ... The object will NOT be matched or passed to the array inupdate
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.