mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 19:26:36 +00:00
Fix entity picker delete button (#20875)
This commit is contained in:
parent
f59ed0a72b
commit
6ccbeb8a75
@ -405,9 +405,9 @@ export class HaEntityPicker extends LitElement {
|
||||
this._opened = ev.detail.value;
|
||||
}
|
||||
|
||||
private _valueChanged(ev: ValueChangedEvent<string>) {
|
||||
private _valueChanged(ev: ValueChangedEvent<string | undefined>) {
|
||||
ev.stopPropagation();
|
||||
const newValue = ev.detail.value.trim();
|
||||
const newValue = ev.detail.value?.trim();
|
||||
|
||||
if (newValue && newValue.startsWith(CREATE_ID)) {
|
||||
const domain = newValue.substring(CREATE_ID.length);
|
||||
@ -433,7 +433,7 @@ export class HaEntityPicker extends LitElement {
|
||||
: this._states;
|
||||
}
|
||||
|
||||
private _setValue(value: string) {
|
||||
private _setValue(value: string | undefined) {
|
||||
this.value = value;
|
||||
setTimeout(() => {
|
||||
fireEvent(this, "value-changed", { value });
|
||||
|
Loading…
x
Reference in New Issue
Block a user