From 14ab1bef14370b330215cb15cc87a6ac499b3041 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 11 Jul 2021 00:15:46 +1000 Subject: [PATCH] Callback to remove row --- InvenTree/templates/js/stock.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index efa3c30ada..2413d36089 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -832,6 +832,13 @@ function loadStockTable(table, options) { $(modal).find('.modal-form-content').html(html); + // Attach callbacks for the action buttons + $(modal).find('.button-stock-item-remove').click(function() { + var pk = $(this).attr('pk'); + + $(modal).find(`#stock_item_${pk}`).remove(); + }); + // Add a "confirm" button insertConfirmButton({ modal: modal,