sencha list paging plugin

前端 未结 5 1569
渐次进展
渐次进展 2021-02-10 06:38

I\'m trying to use sencha touch\'s listpaging plugin. But there is almost no good( or bad ) documentation about how to use it and i\'m confused.

When i activate the plu

5条回答
  •  北海茫月
    2021-02-10 07:07

    I'm having problems finding good documentation, too, but I can at least answer your question. You need to add pageSize to your store, clearOnPageLoad as well, if you want to not clear out what was already loaded. Her's my code:

    Ext.regStore('publicresources', {
    
    model: 'PublicResource',
    autoLoad:false,
    remoteFilter:true,
    sortOnFilter:true,
        pageSize: 15,
        clearOnPageLoad: false, 
    sorters: [
        {
            property : 'distance',
            direction: 'ASC'
        }
    ]
    

    });

    My outstanding issues that I'm looking into are:

    1. How to turn off the "More" element when there are no more records to load
    2. How to detect that there are no more records to load, and where to put that detection code.
    3. How to keep the list at the location that the user was at. Each load jumps back to the 1st item in the list

    Good luck!

提交回复
热议问题