From 5021cca59cc13d1bfa8ce039069748e0811eae3f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 16 Apr 2019 15:14:33 +0200 Subject: [PATCH] Don't capture submit of all dbTable-Forms --- static/js/utils/asyncTable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/utils/asyncTable.js b/static/js/utils/asyncTable.js index 9c731b33e..a8021817b 100644 --- a/static/js/utils/asyncTable.js +++ b/static/js/utils/asyncTable.js @@ -135,7 +135,7 @@ if (tableFilterForm) { gatherTableFilterInputs(tableFilterForm); - addTableFilterEventListeners(); + addTableFilterEventListeners(tableFilterForm); } } @@ -157,7 +157,7 @@ }); } - function addTableFilterEventListeners() { + function addTableFilterEventListeners(tableFilterForm) { tableFilterInputs.search.forEach(function(input) { var debouncedInput = debounce(function() { if (input.value.length === 0 || input.value.length > 2) { @@ -188,7 +188,7 @@ }); }); - element.addEventListener('submit', function(event) { + tableFilterForm.addEventListener('submit', function(event) { event.preventDefault(); updateFromTableFilter(); });