Couldn't find any similar posts. (Apologies if one did exist tho')
I noticed that if [totalCount] is 0, your logic here breaks:
self.isForwardDisabled = ko.computed(function () {
return self.currentPage() === self.pagesCount();
// <-- problem, if pagesCount() == 0; where it is, if [totalCount] == 0
//return self.currentPage() >= self.pagesCount(); <-- solved, or should I put logic to check if [totalCount] is zero, then change [currentPage] to zero?
});
It allows to use [Next] and [Last] -buttons, causing the page numbering to become negative based.
You can test this on your example (http://faulknercs.github.io/Knockstrap/#pagination) - just change [Total items] to 0 (zero) and press [Last] -button.
Hi,
Couldn't find any similar posts. (Apologies if one did exist tho')
I noticed that if [totalCount] is 0, your logic here breaks:
and possible here:
It allows to use [Next] and [Last] -buttons, causing the page numbering to become negative based. You can test this on your example (http://faulknercs.github.io/Knockstrap/#pagination) - just change [Total items] to 0 (zero) and press [Last] -button.