ExtJS panel crashes when removeAll() calling frequently

320 views Asked by At

I have a panel for list feed items in child panels. I need to remove all items from panel before feed filter action. My code is below and it works correctly, but when filter action calling frequently, application crashes.

filter:function(){
//
.... some process before filtering
///
    var panel=this.lookupReference('feedsPanel');
    panel.removeAll();//<-- Application crashes this line

    var items=[];
    for(var i=0; i<mStore.data.items.length;i++){
        var item= Ext.create('MyApp.view.custom.FeedCard',{
                mdata:mStore.data.items[i]
            });
        items.push(item);
    }
    panel.add(items);
    panel.doLayout();
}

And eror is

Uncaught TypeError: Cannot read property 'style' of null  ........ ext-all-debug.js:22567

Framework: ExtJS 5.1

0

There are 0 answers