Skip to content

Commit

Permalink
Fixed bug on reload with empty page
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Heys committed Jun 16, 2016
1 parent 540d5c1 commit 2a03961
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions dist/ng-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,10 @@
if (!angular.equals(oldPages, newPages)){
currentPages = newPages;
ngTableEventsChannel.publishPagesChanged(this, newPages, oldPages);

if (self.data && self.data.length === 0 && self.total() > 0) {
self.page(self.page() - 1);
}
}
}
})();
Expand Down Expand Up @@ -1343,8 +1347,6 @@
}]);
})();



/**
* ngTable: Table + Angular JS
*
Expand Down

0 comments on commit 2a03961

Please sign in to comment.