[TASK] select boat on click
This commit is contained in:
@ -42,6 +42,10 @@ function initBoatActions() {
|
||||
const rowers = Number(select.dataset.seats) - 1;
|
||||
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;
|
||||
}
|
||||
(rowers === 0 ? choiceObjects['newrower'].disable() : choiceObjects['newrower'].enable());
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user