mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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;
|
||||
|
||||
if (count == undefined || count == null) {
|
||||
let data = $(table_name).bootstrapTable('getData');
|
||||
count = data.length;
|
||||
}
|
||||
|
||||
let badge = $(`#sidebar-badge-${label}`);
|
||||
|
||||
badge.html(count);
|
||||
|
Loading…
Reference in New Issue
Block a user