diff --git a/InvenTree/templates/js/translated/bom.js b/InvenTree/templates/js/translated/bom.js index 5380afae649b..1fe074639678 100644 --- a/InvenTree/templates/js/translated/bom.js +++ b/InvenTree/templates/js/translated/bom.js @@ -1308,15 +1308,20 @@ function loadBomTable(table, options={}) { var data = table.bootstrapTable('getData'); - for (var idx = 0; idx < data.length; idx++) { - var row = data[idx]; + var update_required = false; - if (!row.parentId) { - row.parentId = parent_id; + for (var idx = 0; idx < data.length; idx++) { - table.bootstrapTable('updateByUniqueId', row.pk, row, true); + if (!data[idx].parentId) { + data[idx].parentId = parent_id; + update_required = true; } } + + // Re-load the table back data + if (update_required) { + table.bootstrapTable('load', data); + } }, onLoadSuccess: function(data) { diff --git a/InvenTree/templates/js/translated/filters.js b/InvenTree/templates/js/translated/filters.js index 349b3028eda8..d2edcaf5fe2b 100644 --- a/InvenTree/templates/js/translated/filters.js +++ b/InvenTree/templates/js/translated/filters.js @@ -324,7 +324,7 @@ function setupFilterList(tableKey, table, target, options={}) { // Callback for reloading the table element.find(`#reload-${tableKey}`).click(function() { - $(table).bootstrapTable('refresh'); + reloadTableFilters(table); }); // Add a callback for downloading table data diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index fbc07bdd09f6..e99f53bde8d6 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -1301,15 +1301,17 @@ function loadParametricPartTable(table, options={}) { for (var idx = 0; idx < data.length; idx++) { var row = data[idx]; - var pk = row.pk; // Make each parameter accessible, based on the "template" columns row.parameters.forEach(function(parameter) { row[`parameter_${parameter.template}`] = parameter.data; }); - $(table).bootstrapTable('updateByUniqueId', pk, row); + data[idx] = row; } + + // Update the table + $(table).bootstrapTable('load', data); } }); }