Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

extjs - How to disable pagination on a store

Whenever a store (Ext.data.Store) reads data from the server, it sends paging parameters like &page=1&start=0&limit=25 in a json proxy or [page:1, start:0, limit:25] using a direct proxy.

I'd like to disable paging in the store or proxy configuration.

I found this workaround, but I'm sure there must be a better method.

proxy: {
    pageParam: undefined,
    startParam: undefined,
    limitParam: undefined,
    ...
}

Does anyone know how to disable paging properly ?

like image 892
Lorenz Meyer Avatar asked Oct 16 '13 07:10

Lorenz Meyer


3 Answers

Another option is to override the proxy's getParams method. This handles the groupers, sorters, filters, page, start and limit parameters. It's defined in Ext.data.proxy.Server

If you want to disable all Extjs used parameters, then you can simple replace it with an empty method:

proxy: {
    getParams: Ext.emptyFn,
    ...
}

You can also extend the proxy class and override this method.

like image 156
Alexander.Berg Avatar answered Oct 20 '22 03:10

Alexander.Berg


store: {
    pageSize: 0,
    limit:0,
....
}

excluding from the request

page: __

start: __

limit: ___

like image 3
Step Avatar answered Oct 20 '22 03:10

Step


I set:

pageSize: 0,

in the model config.

like image 2
DSoa Avatar answered Oct 20 '22 03:10

DSoa