1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    42
    Vote Rating
    0
    HugoTrigo is on a distinguished road

      0  

    Default Unanswered: Filter List

    Unanswered: Filter List


    Hi,

    I filter a store through Father (int), where the Father (int) is always equal to the identifer (int) of the item you clicked on the previous list.


    But when he meets Father is one of the first Father and all that the Father beginning by 1! or 10, 11, 12, ...


    I have the following code in the list itemtap:

    Code:
    var me = this,
    channels,
    channels_list,
    channels_store,
    channels_filter,
    channels_detail,
    channels_detail_toolbar,
    pai = record.get('IDentifier');
    
    
    console.log(pai);
    
    
    if (record.get('Leaf') === false) {
    
    
        if (record) {
    
    
            channels = Ext.create('Vive.view.Channels', {});
    
    
            channels_list = channels.child('#channelsList');
    
    
            channels_store = Ext.create('Vive.store.Channels',{});
    
    
            channels_store.setFilters(
                [
                    {
                        property: "Pai",
                        value: pai
                    },
                    {
                        property: "Active",
                        value: true
                    }
                ]
            );
    
    
            channels_list.setStore('Channels');
    
    
            me.getChannelsNav().push(channels);
        }
    
    
    }else{
    
    
        if (record) {
    
    
            channels_detail = Ext.create('Vive.view.ChannelsDetail',{});
    
    
            channels_detail_toolbar = channels_detail.child('#channelsDetail_toolbar');
    
    
            channels_detail_toolbar.child('#channelsDetail_toolbarIcon').setData(record.data);
    
    
            channels_detail_toolbar.child('#channelsDetail_toolbarTitle').setData(record.data);
    
    
            channels_detail.child('#channelsDetail_image').setData(record.data);
    
    
            me.getChannelsNav().push(channels_detail);
        }
    
    
    }
    Thanks!

    Best Regards,
    Hugo Trigo

  2. #2
    Sencha User
    Join Date
    Jan 2013
    Posts
    42
    Vote Rating
    0
    HugoTrigo is on a distinguished road

      0  

    Default


    SOLVED!

    Create a filterFn and result!

    Code:
    {filterFn: function(item){return item.get("Pai") === pai; }}

Tags for this Thread