From 1388891ef5833d2cc88ea0ffd9af8860b33830ab Mon Sep 17 00:00:00 2001 From: sudoer777 <78781902+sudoer777@users.noreply.github.com> Date: Fri, 26 Nov 2021 22:21:52 -0700 Subject: [PATCH] Update table on dropdown change for index --- public/scripts/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/scripts/index.js b/public/scripts/index.js index ef28b6f..1b70ca3 100644 --- a/public/scripts/index.js +++ b/public/scripts/index.js @@ -40,17 +40,24 @@ async function initializeForm() { await Form.populateDivisions(divisionDropdown, sportDropdown.value, genderDropdown.value); await Form.populateTeams(teamDropdown, sportDropdown.value); } + + seasonDropdown.onchange = loadTable; sportDropdown.onchange = async () => { await Form.populateGenders(genderDropdown, sportDropdown.value) await Form.populateDivisions(divisionDropdown, sportDropdown.value, genderDropdown.value); await Form.populateTeams(teamDropdown, sportDropdown.value); + loadTable(); }; genderDropdown.onchange = async () => { await Form.populateDivisions(divisionDropdown, sportDropdown.value, genderDropdown.value); + loadTable(); }; + divisionDropdown.onchange = loadTable; + teamDropdown.onchange = loadTable; + loadTable();