mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Fix for index page badge (#5115)
- If table was not paginated, totalRows did not exist - Handle this case by looking at length of actual data
This commit is contained in:
parent
940fa74365
commit
53e120cdb3
@ -66,6 +66,11 @@ function addHeaderAction(label, title, icon, options) {
|
|||||||
|
|
||||||
let count = options.totalRows;
|
let count = options.totalRows;
|
||||||
|
|
||||||
|
if (count == undefined || count == null) {
|
||||||
|
let data = $(table_name).bootstrapTable('getData');
|
||||||
|
count = data.length;
|
||||||
|
}
|
||||||
|
|
||||||
let badge = $(`#sidebar-badge-${label}`);
|
let badge = $(`#sidebar-badge-${label}`);
|
||||||
|
|
||||||
badge.html(count);
|
badge.html(count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user