View Full Version : Set No query Params on PagingToolbar

14 Nov 2011, 8:49 PM
Dear all,

I have an EditorGridPanel including a PagingToolbar inside. On the tbar, there is Reset to First Page that reload the first page. Find below the code for Reset to First Page:

text : 'Reset to First Page',
handler : function() {
languages_grid.store.reload({params:{start:0, limit:3, query:''}});

As you see above, I have to set query params to '' (nothing). Yes, the problem appear when searching query performed through SearchField. Every click after searching action will include the query params.

For the first click after searching action, Reset to First Page gives expected result by displaying the first page of grid. Unfortunately, when the next button clicked, the grid is going messed up by only displaying the search result (again) from last query, so the paging number became confusing.

Are there any solution to fix that? Perhaps through modification of PagingToolbar so the query params? Or else?

Thanks in advance!

18 Nov 2011, 1:12 PM
Have you inspected the base params on the store? SearchField applies the query there and specifying an empty string is a falsey value so the base param would not get overwrote.