Don't need to detach and re-attach rows any more!!

This commit is contained in:
Oliver Walters 2019-05-29 00:47:36 +10:00
parent 2ccb014d9e
commit ea03205c50

View File

@ -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);
});
}
});