fix(pagination): Wrong calcul for num pages

This commit is contained in:
Joxit 2019-06-23 22:55:32 +02:00
parent ef149bf1cc
commit 0ac7a151d9
No known key found for this signature in database
GPG key ID: F526592B8E012263

View file

@ -76,7 +76,7 @@ registryUI.getPage = function(elts, page, limit) {
registryUI.getNumPages = function(elts, limit) {
if (!limit) { limit = 100; }
if (!elts) { return 0; }
return Math.trunc((elts.length / limit) % 10) + 1;
return Math.trunc(elts.length / limit) + 1;
}
registryUI.getPageLabels = function(page, nPages) {