mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix guiMode toggle bugs in element-editor (#17282)
This commit is contained in:
parent
38ea25cf5a
commit
11fa9d1ed8
@ -131,14 +131,16 @@ export abstract class HuiElementEditor<T, C = any> extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
fireEvent(this, "config-changed", {
|
||||
config: this.value! as any,
|
||||
error: this._errors?.join(", "),
|
||||
guiModeAvailable: !(
|
||||
this.hasWarning ||
|
||||
this.hasError ||
|
||||
this._guiSupported === false
|
||||
),
|
||||
this.updateComplete.then(() => {
|
||||
fireEvent(this, "config-changed", {
|
||||
config: this.value! as any,
|
||||
error: this._errors?.join(", "),
|
||||
guiModeAvailable: !(
|
||||
this.hasWarning ||
|
||||
this.hasError ||
|
||||
this._guiSupported === false
|
||||
),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -156,13 +158,15 @@ export abstract class HuiElementEditor<T, C = any> extends LitElement {
|
||||
|
||||
public set GUImode(guiMode: boolean) {
|
||||
this._guiMode = guiMode;
|
||||
fireEvent(this as HTMLElement, "GUImode-changed", {
|
||||
guiMode,
|
||||
guiModeAvailable: !(
|
||||
this.hasWarning ||
|
||||
this.hasError ||
|
||||
this._guiSupported === false
|
||||
),
|
||||
this.updateComplete.then(() => {
|
||||
fireEvent(this as HTMLElement, "GUImode-changed", {
|
||||
guiMode,
|
||||
guiModeAvailable: !(
|
||||
this.hasWarning ||
|
||||
this.hasError ||
|
||||
this._guiSupported === false
|
||||
),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user