diff --git a/src/components/common/Pagination.tsx b/src/components/common/Pagination.tsx index 79d632abee..b20e510bb8 100644 --- a/src/components/common/Pagination.tsx +++ b/src/components/common/Pagination.tsx @@ -69,34 +69,25 @@ const Pagination: FC = ({ viewQuerySettings, setViewQuerySettin return (
- {showControls && ( -
- - - {globalize.translate('ListPaging', (totalRecordCount ? startIndex + 1 : 0), recordsEnd, totalRecordCount)} - - - - -
- )} - {!showControls && ( -
- - - {globalize.translate('ListPaging', (totalRecordCount ? startIndex + 1 : 0), totalRecordCount, totalRecordCount)} - - -
- )} +
+ + {globalize.translate('ListPaging', (totalRecordCount ? startIndex + 1 : 0), recordsEnd || totalRecordCount, totalRecordCount)} + + {showControls && ( +
+ + +
+ )} +
); diff --git a/src/scripts/libraryBrowser.js b/src/scripts/libraryBrowser.js index 5ad69fb85e..c4fdd0577f 100644 --- a/src/scripts/libraryBrowser.js +++ b/src/scripts/libraryBrowser.js @@ -86,15 +86,9 @@ export function getQueryPagingHtml (options) { html += '
'; - if (showControls) { - html += ''; - html += globalize.translate('ListPaging', totalRecordCount ? startIndex + 1 : 0, recordsEnd, totalRecordCount); - html += ''; - } else { - html += ''; - html += globalize.translate('ListPaging', totalRecordCount ? startIndex + 1 : 0, totalRecordCount, totalRecordCount); - html += ''; - } + html += ''; + html += globalize.translate('ListPaging', totalRecordCount ? startIndex + 1 : 0, recordsEnd || totalRecordCount, totalRecordCount); + html += ''; if (showControls || options.viewButton || options.filterButton || options.sortButton || options.addLayoutButton) { html += '
';