mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +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", {
|
this.updateComplete.then(() => {
|
||||||
config: this.value! as any,
|
fireEvent(this, "config-changed", {
|
||||||
error: this._errors?.join(", "),
|
config: this.value! as any,
|
||||||
guiModeAvailable: !(
|
error: this._errors?.join(", "),
|
||||||
this.hasWarning ||
|
guiModeAvailable: !(
|
||||||
this.hasError ||
|
this.hasWarning ||
|
||||||
this._guiSupported === false
|
this.hasError ||
|
||||||
),
|
this._guiSupported === false
|
||||||
|
),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,13 +158,15 @@ 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;
|
||||||
fireEvent(this as HTMLElement, "GUImode-changed", {
|
this.updateComplete.then(() => {
|
||||||
guiMode,
|
fireEvent(this as HTMLElement, "GUImode-changed", {
|
||||||
guiModeAvailable: !(
|
guiMode,
|
||||||
this.hasWarning ||
|
guiModeAvailable: !(
|
||||||
this.hasError ||
|
this.hasWarning ||
|
||||||
this._guiSupported === false
|
this.hasError ||
|
||||||
),
|
this._guiSupported === false
|
||||||
|
),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user