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(); });