From ea03205c50dda3ef248370f39bd14e49a257c8cf Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 29 May 2019 00:47:36 +1000 Subject: [PATCH] Don't need to detach and re-attach rows any more!! --- .../script/bootstrap/bootstrap-table-group-by.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js b/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js index 0f11c4c98d..09c2d49553 100644 --- a/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js +++ b/InvenTree/static/script/bootstrap/bootstrap-table-group-by.js @@ -181,16 +181,8 @@ that.$body.find('tr[data-parent-index=' + item.id + ']').addClass('hidden stock-sub-group'); + // Insert the group header row before the first item that.$body.find('tr[data-parent-index=' + item.id + ']:first').before($(html.join(''))); - - var group_header = that.$body.find('tr[data-group-index=' + item.id + ']'); - - // Ensure all the sub-items are in the right place... - - that.$body.find('tr[data-parent-index=' + item.id + ']').each(function() { - $(this).detach(); - group_header.after(this); - }); } });