Further fixing the refactoring

This commit is contained in:
Pieter Vander Vennet 2021-06-13 15:04:55 +02:00
parent 3943100e54
commit 49c821268e
8 changed files with 66 additions and 86 deletions

View file

@ -40,6 +40,7 @@ export class DropDown<T> extends InputElement<T> {
const labelHtml = document.createElement("label")
labelHtml.appendChild(labelEl)
labelHtml.htmlFor = el.id;
el.appendChild(labelHtml)
}
}
@ -52,7 +53,10 @@ export class DropDown<T> extends InputElement<T> {
const option = document.createElement("option")
option.value = "" + i
option.appendChild(Translations.W(values[i].shown).ConstructElement())
select.appendChild(option)
}
el.appendChild(select)
select.onchange = (() => {
var index = select.selectedIndex;