mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-29 08:29:54 +03:00
fix(pagination): Wrong calcul for num pages
This commit is contained in:
parent
ef149bf1cc
commit
0ac7a151d9
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ registryUI.getPage = function(elts, page, limit) {
|
||||||
registryUI.getNumPages = function(elts, limit) {
|
registryUI.getNumPages = function(elts, limit) {
|
||||||
if (!limit) { limit = 100; }
|
if (!limit) { limit = 100; }
|
||||||
if (!elts) { return 0; }
|
if (!elts) { return 0; }
|
||||||
return Math.trunc((elts.length / limit) % 10) + 1;
|
return Math.trunc(elts.length / limit) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
registryUI.getPageLabels = function(page, nPages) {
|
registryUI.getPageLabels = function(page, nPages) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue