change select properly if boat is selected on the left

This commit is contained in:
2023-09-24 11:19:10 +02:00
parent 9d08ee5a9d
commit 514561321e
4 changed files with 66 additions and 43 deletions

View File

@ -72,9 +72,9 @@ function initBoatActions() {
choiceObjects['newrower'].config.maxItemCount = rowers;
choiceObjects['newrower'].removeActiveItems(rowers);
let boatSelect = <HTMLSelectElement>document.querySelector('#boat_id');
if(boatSelect && select.dataset.id) {
boatSelect.value = select.dataset.id;
}
choiceObjects['boat_id'].setChoiceByValue(select.dataset.id);
(rowers === 0 ? choiceObjects['newrower'].disable() : choiceObjects['newrower'].enable());
}
});