From 1f70538b043a03168e1666b01d8fe450a58025ee Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 4 Aug 2021 14:24:17 +1000 Subject: [PATCH] Adds a button to tables to reload data --- InvenTree/templates/js/translated/filters.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/InvenTree/templates/js/translated/filters.js b/InvenTree/templates/js/translated/filters.js index 4ee08affdf..bc0dc1b958 100644 --- a/InvenTree/templates/js/translated/filters.js +++ b/InvenTree/templates/js/translated/filters.js @@ -265,6 +265,8 @@ function setupFilterList(tableKey, table, target) { // One blank slate, please element.empty(); + element.append(``); + element.append(``); if (Object.keys(filters).length > 0) { @@ -279,6 +281,11 @@ function setupFilterList(tableKey, table, target) { element.append(`
${title} = ${value}x
`); } + // Callback for reloading the table + element.find(`#reload-${tableKey}`).click(function() { + $(table).bootstrapTable('refresh'); + }); + // Add a callback for adding a new filter element.find(`#${add}`).click(function clicked() {