Fix bug in games.js where dropdowns are not being updated

main
sudoer777 2021-11-25 13:03:54 -07:00
parent d5be13955a
commit b7f032754b
1 changed files with 13 additions and 0 deletions

View File

@ -67,6 +67,19 @@ async function initializeForm() {
team1ScoreTextbox.disabled = false; team1ScoreTextbox.disabled = false;
team2ScoreTextbox.disabled = false; team2ScoreTextbox.disabled = false;
submitButton.disabled = false; submitButton.disabled = false;
sportDropdown.onchange = () => {
Form.populateGenders(genderDropdown, sportDropdown.value)
.then(() => {
Form.populateDivisions(divisionDropdown, sportDropdown.value, genderDropdown.value);
});
Form.populateTeams(team1Dropdown, sportDropdown.value);
Form.populateTeams(team2Dropdown, sportDropdown.value);
};
genderDropdown.onchange = () => {
Form.populateDivisions(divisionDropdown, sportDropdown.value, genderDropdown.value);
};
} }
initializeForm(); initializeForm();