1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Munich, Germany
    Posts
    58
    Vote Rating
    1
    kodak is on a distinguished road

      0  

    Default Unanswered: howto filter store from a list

    Unanswered: howto filter store from a list


    Hi!

    Iam trying to apply several filter which I get from a localStorage store.

    I load the store and can apply some filters:

    Code:
    var newsStore = Ext.getStore("cityStore");
    
    newsStore.filter(Ext.create('Ext.util.Filter', {
        filterFn: function(item) {
            return item.get('name') == 'city1' || item.get('name') == 'city2';  
    }
        }));
    But now I have a list of items and would like to iterate through all items in the list and apply them to the store filter.

    The problem is imho that I cannot iterate though a loop and do return item.get('name') == 'variable' again and again because this would only filter for the last return but I would like to apply every item in the list as the filter seen above.

    Hope I can find some help here...

    Thanks!

  2. #2
    Sencha User
    Join Date
    Nov 2012
    Location
    Netherlands
    Posts
    50
    Answers
    6
    Vote Rating
    1
    eastlander is on a distinguished road

      0  

    Default


    Code:
    filterFn: function (item) {
        for (var i = 0; i < myFilters.length; i++) {
            if (item.get('name') == myFilters[i]) return true;
        }
    
    
        return false;
    }

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi