diff --git a/InvenTree/templates/js/translated/index.js b/InvenTree/templates/js/translated/index.js index 7b7a24d2a1..3fe010457c 100644 --- a/InvenTree/templates/js/translated/index.js +++ b/InvenTree/templates/js/translated/index.js @@ -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);