More fixes to the refactored code

This commit is contained in:
Pieter Vander Vennet 2021-06-15 16:18:58 +02:00
parent 42d13f564c
commit 94f9a0de56
15 changed files with 78 additions and 82 deletions

View file

@ -21,6 +21,8 @@ export class DropDown<T> extends InputElement<T> {
}
) {
super();
value = value ?? new UIEventSource<T>(undefined)
this._value = value
this._values = values;
if (values.length <= 1) {
return;
@ -43,7 +45,7 @@ export class DropDown<T> extends InputElement<T> {
el.appendChild(labelHtml)
}
}
options = options ?? {}
options.select_class = options.select_class ?? 'bg-indigo-100 p-1 rounded hover:bg-indigo-200'

View file

@ -106,7 +106,7 @@ export class TextField extends InputElement<string> {
newCursorPos--;
}
// @ts-ignore
TextField.SetCursorPosition(newCursorPos);
TextField.SetCursorPosition(field, newCursorPos);
};