Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #10 from zoli7/patch-1

Disable paging buttons on empty grid
  • Loading branch information...
commit a0d6470d7b16f6bf20302268682aa4dcd0728acc 2 parents 70b6861 + 78797ae
@mitchellsimoens mitchellsimoens authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 Ext.ux.touch.grid/feature/Paging.js
View
7 Ext.ux.touch.grid/feature/Paging.js
@@ -227,6 +227,7 @@ Ext.define('Ext.ux.touch.grid.feature.Paging', {
store.on('load', 'handleGridPaint', me, { single : true });
return;
}
+ store.on('clear', 'handleGridPaint', me, { single : true });
var total = store.getTotalCount(),
currentPage = store.currentPage,
@@ -237,9 +238,9 @@ Ext.define('Ext.ux.touch.grid.feature.Paging', {
me.setPages(pages);
- backButton .setDisabled(currentPage === 1);
- forwardButton.setDisabled(currentPage === pages);
- goToButton .setDisabled(pages === 0);
+ backButton .setDisabled(currentPage === 1 || store.getCount() === 0);
+ forwardButton.setDisabled(currentPage === pages || store.getCount() === 0);
+ goToButton .setDisabled(pages === 0 || store.getCount() === 0);
},
handleBackButton : function() {
Please sign in to comment.
Something went wrong with that request. Please try again.