diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js index 5c2840b121..81cc4e0630 100644 --- a/InvenTree/templates/js/part.js +++ b/InvenTree/templates/js/part.js @@ -516,11 +516,21 @@ function loadPartTable(table, url, options={}) { var html = ''; - data.forEach(function(row) { + html = `
`; + + data.forEach(function(row, index) { + + // Force a new row every 4 columns, to prevent visual issues + if ((index > 0) && (index % 4 == 0) && (index < data.length)) { + html += `
`; + } + html += partGridTile(row); }); - return `
${html}
`; + html += `
`; + + return html; } });