Results 1 to 7 of 7

Thread: [3461] ExtJS4 store suspendEvents clearFilter problem

    You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    3

    Default [3461] ExtJS4 store suspendEvents clearFilter problem

    Hi all,

    I'm having a problem while suspending events on a remote sort/filter store. I'm trying to clear filters and setting a new one, but my server is receiving 2 queries, one without filters and another one with new filter. Mi code:

    Code:
    store.suspendEvents(false);
    store.clearFilter(true);
    store.resumeEvents();
    store.filter({
        property: prop,
        anyMatch: true,
        value   : value
    });

    This is not suposed to work?

  2. #2
    Sencha User
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939

    Default

    Agreed - that's not a good behavior. Moved to the bugs forum and pushed into our tracker to get this fixed for 4.1

  3. #3
    Sencha User
    Join Date
    Jan 2011
    Posts
    3

    Default

    The quick fix right now could be something like this:

    Code:
    store.remoteFilter = false;
    store.clearFilter(true);
    store.remoteFilter = true;  
    
    store.filter({
        property: prop,
        anyMatch: true,
        value   : value
    });
    But property remoteFilter is not documented on Ext.data.Store

  4. #4
    Sencha User
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939

    Default

    Quote Originally Posted by xkulio View Post
    But property remoteFilter is not documented on Ext.data.Store
    Yes it is... see http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.Store

  5. #5

    Default

    same problem here, it seems store.suspendEvents() is not working in extjs 4 .
    or its calling resume events even after setting it to false .


  6. #6
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    43

    Default

    Quote Originally Posted by xkulio View Post
    The quick fix right now could be something like this:

    Code:
    store.remoteFilter = false;
    store.clearFilter(true);
    store.remoteFilter = true;  
    
    store.filter({
        property: prop,
        anyMatch: true,
        value   : value
    });
    But property remoteFilter is not documented on Ext.data.Store
    Thank you !

  7. #7
    Sencha User
    Join Date
    Jun 2013
    Posts
    20

    Default

    can do like this also
    Code:
    var isRemoteFilter = store.remoteFilter;								this.store.remoteFilter = false;
    								this.store.clearFilter(true);
    								this.store.remoteFilter = isRemoteFilter;

Posting Permissions

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