bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Pagination not resetting when total is zero

Open djkprojects opened this issue 13 years ago • 2 comments

When total changes to 0 the pagination doesn't reset and stops functioning:

http://plnkr.co/edit/VDQtybdbS8SCMKQQsF4C?p=preview

Expected behaviour would be to reset it and show only 1st page. Potential fix:

$scope.$watch('totalItems', function() { $scope.totalPages = self.calculateTotalPages() || 1; });

djkprojects avatar Oct 18 '13 23:10 djkprojects

This appears to be fixed in master by 8ecf93ed, calculateTotalPages won't return anything less than 1.

plunker: http://plnkr.co/edit/gaLE4mqClxnMoqsS002G?p=preview

bsundsrud avatar Nov 02 '13 19:11 bsundsrud

Thnx @bsundsrud

pkozlowski-opensource avatar Nov 02 '13 19:11 pkozlowski-opensource