Results 1 to 2 of 2

Thread: Difference Between Store Filter Methods

  1. #1
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    5

    Default Difference Between Store Filter Methods

    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:

    Code:
    store.filterBy(function(item) {
        return true;
    });
    and then using something like

    Code:
    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?

  2. #2
    Sencha User slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,165
    Answers
    505

    Default

    This is the normal behavior. If you want to have the filter registered you can use:
    store.filter({filterFn: function () {}});

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •