Fix bug in games.js where dropdowns are not being updated
parent
d5be13955a
commit
b7f032754b
|
@ -67,6 +67,19 @@ async function initializeForm() {
|
|||
team1ScoreTextbox.disabled = false;
|
||||
team2ScoreTextbox.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();
|
||||
|
||||
|
|
Reference in New Issue