سؤال

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