mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #2511 from SchrodingersGat/table-pagination-fix
Customize text if totalRows not known
This commit is contained in:
commit
35561b46ef
@ -371,7 +371,12 @@ function customGroupSorter(sortName, sortOrder, sortData) {
|
||||
return `${pageNumber} {% trans "rows per page" %}`;
|
||||
},
|
||||
formatShowingRows: function(pageFrom, pageTo, totalRows) {
|
||||
return `{% trans "Showing" %} ${pageFrom} {% trans "to" %} ${pageTo} {% trans "of" %} ${totalRows} {% trans "rows" %}`;
|
||||
|
||||
if (totalRows === undefined || totalRows === NaN) {
|
||||
return '{% trans "Showing all rows" %}';
|
||||
} else {
|
||||
return `{% trans "Showing" %} ${pageFrom} {% trans "to" %} ${pageTo} {% trans "of" %} ${totalRows} {% trans "rows" %}`;
|
||||
}
|
||||
},
|
||||
formatSearch: function() {
|
||||
return '{% trans "Search" %}';
|
||||
|
Loading…
Reference in New Issue
Block a user