mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +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?
|
// How many rows are fully allocated?
|
||||||
var allocated_rows = 0;
|
var allocated_rows = 0;
|
||||||
|
|
||||||
bom_items.forEach(function(row) {
|
for (var idx = 0; idx < bom_items.length; idx++) {
|
||||||
$(table).bootstrapTable('updateByUniqueId', row.pk, row, true);
|
var row = bom_items[idx];
|
||||||
|
|
||||||
if (isRowFullyAllocated(row)) {
|
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
|
// Find the top-level progess bar for this build output
|
||||||
var output_progress_bar = $(`#output-progress-${outputId}`);
|
var output_progress_bar = $(`#output-progress-${outputId}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user