mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +00:00
Fix @changed where using ev.detail (#12043)
This commit is contained in:
parent
1fa04baa16
commit
dcf50e055b
@ -22,7 +22,6 @@ import {
|
||||
showAlertDialog,
|
||||
showPromptDialog,
|
||||
} from "../../../dialogs/generic/show-dialog-box";
|
||||
import { PolymerChangedEvent } from "../../../polymer-types";
|
||||
import { haStyleDialog } from "../../../resources/styles";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
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._name = ev.detail.value;
|
||||
this._name = ev.target.value;
|
||||
}
|
||||
|
||||
private _adminChanged(ev): void {
|
||||
|
@ -113,9 +113,9 @@ export class HuiPictureCardEditor
|
||||
return;
|
||||
}
|
||||
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;
|
||||
}
|
||||
if (target.configValue) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user