forked from MapComplete/MapComplete
Cleanup of textfield code
This commit is contained in:
parent
1f41444726
commit
3667f28f15
9 changed files with 293 additions and 219 deletions
10
test.ts
10
test.ts
|
@ -1,4 +1,8 @@
|
|||
import {UIEventSource} from "./Logic/UIEventSource";
|
||||
import DeleteImage from "./UI/Image/DeleteImage";
|
||||
import ValidatedTextField from "./UI/Input/ValidatedTextField";
|
||||
import {VariableUiElement} from "./UI/Base/VariableUIElement";
|
||||
|
||||
new DeleteImage("image", new UIEventSource<any>({"image":"url"})).AttachTo("maindiv");
|
||||
|
||||
const vtf= ValidatedTextField.KeyInput(true);
|
||||
vtf.AttachTo('maindiv')
|
||||
vtf.GetValue().addCallback(console.log)
|
||||
new VariableUiElement(vtf.GetValue().map(n => ""+n)).AttachTo("extradiv")
|
Loading…
Add table
Add a link
Reference in a new issue