mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-26 14:27:20 +00:00
Fix @changed where using ev.detail (#12043)
This commit is contained in:
parent
1fa04baa16
commit
dcf50e055b
@ -22,7 +22,6 @@ import {
|
|||||||
showAlertDialog,
|
showAlertDialog,
|
||||||
showPromptDialog,
|
showPromptDialog,
|
||||||
} from "../../../dialogs/generic/show-dialog-box";
|
} from "../../../dialogs/generic/show-dialog-box";
|
||||||
import { PolymerChangedEvent } from "../../../polymer-types";
|
|
||||||
import { haStyleDialog } from "../../../resources/styles";
|
import { haStyleDialog } from "../../../resources/styles";
|
||||||
import { HomeAssistant } from "../../../types";
|
import { HomeAssistant } from "../../../types";
|
||||||
import { UserDetailDialogParams } from "./show-dialog-user-detail";
|
import { UserDetailDialogParams } from "./show-dialog-user-detail";
|
||||||
@ -212,9 +211,9 @@ class DialogUserDetail extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _nameChanged(ev: PolymerChangedEvent<string>) {
|
private _nameChanged(ev) {
|
||||||
this._error = undefined;
|
this._error = undefined;
|
||||||
this._name = ev.detail.value;
|
this._name = ev.target.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _adminChanged(ev): void {
|
private _adminChanged(ev): void {
|
||||||
|
@ -113,9 +113,9 @@ export class HuiPictureCardEditor
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const target = ev.target! as EditorTarget;
|
const target = ev.target! as EditorTarget;
|
||||||
const value = ev.detail.value;
|
const value = ev.detail?.value ?? target.value;
|
||||||
|
|
||||||
if (this[`_${target.configValue}`] === target.value) {
|
if (this[`_${target.configValue}`] === value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (target.configValue) {
|
if (target.configValue) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user