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