문제

I had a fairly long list to display in my sencha touch mobile app, due to the contents of the list, the app was pretty heavy and then i found this great tool it increased the efficiency drastically But the issue which comes with this library is that it would display the first 70 items, and when you scroll down it does not display things at all. Has anyone dealt with it. Please let me know.

Mentioned below is the sample of the test-code, which will help you simulate.

Ext.reg('mylist', Ext.ux.BufferedList);

var data = [];
for (var i = 0; i < 600000; i++)
    data.push({
        firstName: 'Mark' + i,
        lastName: 'Taylor'
    });

Ext.setup({
    onReady: function() {
        Ext.regModel('Contact', {
            fields: ['firstName', 'lastName']
        });

        var store = new Ext.data.Store({
            model: 'Contact',
            data: data
        });

        new Ext.TabPanel({
            layout: 'fit',
            fullscreen: true,
            scroll: 'vertical',
            items: [{
                title: 'MyPanel',
                xtype: 'panel'},
            {
                title: 'MyList',
                fullscreen: true,
                xtype: 'mylist',
                itemTpl: '{firstName} {lastName}',
                store: store}]
        });
    }
});
도움이 되었습니까?

해결책

https://gist.github.com/1244583 this is what you are searching i guess!!

the only updation i have made is in line 35!!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top