From 7120b940f0480d3eaf1c6ba0c04d38e5f1fba491 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 28 May 2019 17:51:02 +1000 Subject: [PATCH] Pre-collapse grouped columns --- InvenTree/static/script/bootstrap/bootstrap-table-group-by.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js b/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js index 4195ba394f..e056ba392f 100644 --- a/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js +++ b/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js @@ -176,6 +176,9 @@ html.push(''); if(item.data.length > 1) { + + that.$body.find('tr[data-parent-index=' + item.id + ']').addClass('hidden'); + that.$body.find('tr[data-parent-index=' + item.id + ']:first').before($(html.join(''))); } });