mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-29 04:06:35 +00:00
Fix ha-devices-picker when changing or deleting devices (#16739)
This commit is contained in:
parent
19fc92419a
commit
76255f2efb
@ -111,10 +111,10 @@ class HaDevicesPicker extends LitElement {
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
const curValue = (event.currentTarget as any).curValue;
|
const curValue = (event.currentTarget as any).curValue;
|
||||||
const newValue = event.detail.value;
|
const newValue = event.detail.value;
|
||||||
if (newValue === curValue || newValue !== "") {
|
if (newValue === curValue) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (newValue === "") {
|
if (newValue === undefined) {
|
||||||
this._updateDevices(
|
this._updateDevices(
|
||||||
this._currentDevices.filter((dev) => dev !== curValue)
|
this._currentDevices.filter((dev) => dev !== curValue)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user