diff --git a/ui/nuxeo-pagination-controls.js b/ui/nuxeo-pagination-controls.js index bf5943ab5..85892c55a 100644 --- a/ui/nuxeo-pagination-controls.js +++ b/ui/nuxeo-pagination-controls.js @@ -86,6 +86,12 @@ import { html } from '@polymer/polymer/lib/utils/html-tag.js'; .total { margin-inline-start: 2rem; + font-size: 1rem; + width: 5rem; + text-align: center; + } + + .currentPage { font-size: 1rem; width: 4rem; text-align: center; @@ -114,8 +120,11 @@ import { html } from '@polymer/polymer/lib/utils/html-tag.js'; >
- - + + [[page]] / [[numberOfPages]]
i + 1); } + + _computeLimitForOptions(numberOfPages) { + const maxItemsForNuxeoSelectPagination = + Nuxeo && + Nuxeo.UI && + Nuxeo.UI.config && + Nuxeo.UI.config.pagination && + Nuxeo.UI.config.pagination.nuxeoSelectOptions && + Nuxeo.UI.config.pagination.nuxeoSelectOptions.listingMaxItems + ? Nuxeo.UI.config.pagination.nuxeoSelectOptions.listingMaxItems + : 1000; + if (numberOfPages > maxItemsForNuxeoSelectPagination) { + return false; + } + return true; + } } customElements.define(PaginationControls.is, PaginationControls);