forked from MapComplete/MapComplete
Improvements to units: move the unit handling into the validated text field, fix 'isValid' and typing of partial denominations
This commit is contained in:
parent
89c5c78f41
commit
37dab7a9a2
3 changed files with 43 additions and 35 deletions
|
@ -65,8 +65,8 @@ export class TextField extends InputElement<string> {
|
|||
|
||||
|
||||
this.value.addCallbackAndRun(value => {
|
||||
if (!(value !== undefined && value !== null)) {
|
||||
field["value"] = "";
|
||||
if (value === undefined || value === null) {
|
||||
// We leave the textfield as is - make sure we do not erase it!
|
||||
return;
|
||||
}
|
||||
field["value"] = value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue