From c8650ce34cfca85d16cc789a6cfa425d4a328c80 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 17 Feb 2021 13:05:58 +1100 Subject: [PATCH] Bug fix for tables --- InvenTree/templates/js/tables.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InvenTree/templates/js/tables.js b/InvenTree/templates/js/tables.js index f2107d8fc9..ceb38690a8 100644 --- a/InvenTree/templates/js/tables.js +++ b/InvenTree/templates/js/tables.js @@ -45,6 +45,10 @@ function linkButtonsToSelection(table, buttons) { * The buttons will only be enabled if there is at least one row selected */ + if (typeof table === 'string') { + table = $(table); + } + // Initially set the enable state of the buttons enableButtons(buttons, table.bootstrapTable('getSelections').length > 0);