forked from MapComplete/MapComplete
Trying to get the checkboxlogic right
This commit is contained in:
parent
c944156d87
commit
e0f2f70c2e
7 changed files with 113 additions and 97 deletions
|
@ -152,7 +152,9 @@ export class TextField<T> extends InputElement<T> {
|
|||
this.ListenTo(this._placeholder._source);
|
||||
this._toString = options.toString ?? ((t) => ("" + t));
|
||||
|
||||
|
||||
this.onClick(() => {
|
||||
self.IsSelected.setData(true)
|
||||
});
|
||||
this.mappedValue.addCallback((t) => {
|
||||
if (t === undefined || t === null) {
|
||||
return;
|
||||
|
@ -202,6 +204,7 @@ export class TextField<T> extends InputElement<T> {
|
|||
field.addEventListener("focusin", () => self.IsSelected.setData(true));
|
||||
field.addEventListener("focusout", () => self.IsSelected.setData(false));
|
||||
|
||||
|
||||
field.addEventListener("keyup", function (event) {
|
||||
if (event.key === "Enter") {
|
||||
// @ts-ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue