I am using listpaging plugin on a list and would like to use it with an 'offset' value. The API that I'm running against doesn't support pagination with 'page' values but rather uses offsets.
If I have a limit of 10 and offset 0, I will get the first 10 records, with limit 10 and offset 10, I will get records 11-20 and so on.
The listpaging plugin though requires a 'page' value. I have tried setting the startParam to 'offset' on my store proxy but this results in loading records 1-11 rather than 11-20.
Any suggestions?
Ext.define('MyApp.store.Retailers', {
extend: 'Ext.data.Store',
config: {
storeId: 'retailersStore',
model: 'MyApp.model.Retailer',
pageSize: 10,
proxy: {
type: 'ajax',
method: 'GET',
url: 'myapp/api/retailers',
startParam: 'offset',
reader: {
type: 'json',
rootProperty: 'data.entries',
totalProperty: 'count'
}
}
}
});