Config UI: fix decimal input in numeric fields (#32458)
This commit is contained in:
parent
c4daf8e866
commit
bfba6bb2fc
2 changed files with 47 additions and 1 deletions
|
|
@ -252,7 +252,7 @@ export default {
|
|||
},
|
||||
useLazyBinding() {
|
||||
// avoid conversion loop issues
|
||||
return this.pricePerKWh;
|
||||
return this.inputType === "number";
|
||||
},
|
||||
icons() {
|
||||
return this.property === "icon";
|
||||
|
|
@ -386,6 +386,8 @@ export default {
|
|||
return val;
|
||||
},
|
||||
onFieldChange(e) {
|
||||
// unparsable input (e.g. locale decimal separator mismatch)
|
||||
if (e.target.validity?.badInput) return;
|
||||
this.value = this.coerceValue(e.target.value);
|
||||
},
|
||||
onFieldInput(e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue