diff --git a/static/plugin_dbui/lib/appgridfilter.js b/static/plugin_dbui/lib/appgridfilter.js index 238c29dcd3e7d43f9f8319a82bd7e3ed7b86f498..7678ad612978bfe0a5b363a9440820f7e2b4fed5 100644 --- a/static/plugin_dbui/lib/appgridfilter.js +++ b/static/plugin_dbui/lib/appgridfilter.js @@ -12,8 +12,9 @@ App.grid.GridFilter = Ext.extend(Object, { /** * Private - * a reference to the grid store + * a reference to the grid and to its store */ + grid: null, store: null, /** @@ -34,7 +35,8 @@ App.grid.GridFilter = Ext.extend(Object, { */ init: function(grid){ - // link the grid store + // link the grid and its store + this.grid = grid; this.store = grid.getStore(); // Keep track of the initial filter conditions @@ -102,7 +104,15 @@ App.grid.GridFilter = Ext.extend(Object, { // update the store this.store.baseParams.where = conditions; - this.store.load(); + + // update the store dealing with paging + if (this.grid.pagingInitialized) { + var bbar = this.grid.getBottomToolbar(); + bbar.doRefresh(); + } else { + this.store.load(); + } + } });