Reputation: 5941
I have an application where I have around 1000 records to be displayed in sencha list from localstore. If i try to populate all the data at one shot then it takes long time to refresh the list (around 1 minute).
Now I want to load list with initial 20 records and then it should load next 20 as user scroll down. How to capture the event when user scrolls to end of list?
Upvotes: 2
Views: 3025
Reputation: 4952
To add to oleg sencha does not paginate ie your pagination logic must be in the server side the plugin only increments the page parameter by 1 which can be configured in the pageParam config in the ajaxProxy of the store
Upvotes: 0
Reputation: 3850
This is excerpt from Secncha Doc site
Ext.create('Ext.dataview.List', {
config: {
plugins: [
{
xclass: 'Ext.plugin.PullRefresh',
pullRefreshText: 'Pull to refresh...'
},
{
xclass: 'Ext.plugin.ListPaging',
autoPaging: true
}
],
itemTpl: '<div class="item">{title}</div>',
store: 'Items'
}
});
From me I'm adding instead of xclass: '' you could also use xtype: 'listpaging'. It also works...
Cheers, Oleg
PS. if it is not still clear paste your code snippets here...
Upvotes: 4