UnitList filterByAll

I couldn’t see filterByAll method for unitlist.

I have multiple filtering rules. So I really need this. How can I implement this method?

You can call filter api multiple times

list.filter(some, value)
list.filter(other, value, true);

http://docs.webix.com/api__link__ui.proto_filter.html

Using true as third parameter changes the behavior of filter command, so filtering is applied not to the original dataset, but to the result of previous filter command.

What if I do same filter twice. Like

list.filter(function(obj){
return obj.text.toString().indexOf(“abc”) != -1;
});

list.filter(function(obj){
return obj.text.toString().indexOf(“efg”) != -1;
});

both of them same type filtering. Both of them based on “obj.text”

I’ve implemented filterByAll function. It works fine right now.

Do you want to combine them by OR or AND logic

OR

list.filter(function(obj){ 
  return obj.text.toString().indexOf("abc") != -1 || obj.text.toString().indexOf("efg") != -1;
});

AND

list.filter(function(obj){ return obj.text.toString().indexOf("abc") != -1; });
list.filter(function(obj){ return obj.text.toString().indexOf("efg") != -1; }, null, true);