mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Improve redraw speed of build allocation table (#3831)
- Reload table data in one go, rather than one row at a time - Reduces redraw time (in one example) from ~4s to ~0.05s
This commit is contained in:
parent
0fd1390fe0
commit
9d39d5b00f
@ -1471,13 +1471,16 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
|
||||
// How many rows are fully allocated?
|
||||
var allocated_rows = 0;
|
||||
|
||||
bom_items.forEach(function(row) {
|
||||
$(table).bootstrapTable('updateByUniqueId', row.pk, row, true);
|
||||
for (var idx = 0; idx < bom_items.length; idx++) {
|
||||
var row = bom_items[idx];
|
||||
|
||||
if (isRowFullyAllocated(row)) {
|
||||
allocated_rows += 1;
|
||||
allocated_rows++;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Reload table data
|
||||
$(table).bootstrapTable('load', bom_items);
|
||||
|
||||
// Find the top-level progess bar for this build output
|
||||
var output_progress_bar = $(`#output-progress-${outputId}`);
|
||||
|
Loading…
Reference in New Issue
Block a user