mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix number selector display for 0 (#18927)
This commit is contained in:
parent
39260d172f
commit
a820ca1e90
@ -30,9 +30,9 @@ export class HaNumberSelector extends LitElement {
|
|||||||
|
|
||||||
protected willUpdate(changedProps: PropertyValues) {
|
protected willUpdate(changedProps: PropertyValues) {
|
||||||
if (changedProps.has("value")) {
|
if (changedProps.has("value")) {
|
||||||
if (this.value !== Number(this._valueStr)) {
|
if (this._valueStr === "" || this.value !== Number(this._valueStr)) {
|
||||||
this._valueStr =
|
this._valueStr =
|
||||||
!this.value || isNaN(this.value) ? "" : this.value.toString();
|
this.value == null || isNaN(this.value) ? "" : this.value.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user