PDA

View Full Version : Difference Between Store Filter Methods



missett
19 Apr 2013, 12:26 AM
Hi guys,

I have a store that I'm filtering- pretty simple stuff. I was just wondering if there was a difference between using something like:



store.filterBy(function(item) {
return true;
});


and then using something like



store.filter([
{ filterFn: function(item) { return true; } }
]);


In my app when I use the first example, the store.filters property doesn't contain a filter after I apply it whereas with the second method it does. Is this normal/expected behaviour? Or does it look like there's a bug somewhere?

slemmon
22 Apr 2013, 10:04 AM
This is the normal behavior. If you want to have the filter registered you can use:
store.filter({filterFn: function () {}});