This commit is contained in:
philipp 2023-09-24 11:32:01 +02:00
parent 93a6b81803
commit c48fd1d87d

View File

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