mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-16 14:30:36 +00:00
Fix automation sidebar editor rerendering (#27607)
This commit is contained in:
@@ -89,7 +89,7 @@ export class HaManualScriptEditor extends LitElement {
|
||||
|
||||
@state() private _sidebarConfig?: SidebarConfig;
|
||||
|
||||
@state() private _sidebarKey?: string;
|
||||
@state() private _sidebarKey = 0;
|
||||
|
||||
@storage({
|
||||
key: "automation-sidebar-width",
|
||||
@@ -512,7 +512,9 @@ export class HaManualScriptEditor extends LitElement {
|
||||
// deselect previous selected row
|
||||
this._sidebarConfig?.close?.();
|
||||
this._sidebarConfig = ev.detail;
|
||||
this._sidebarKey = JSON.stringify(this._sidebarConfig);
|
||||
|
||||
// be sure the sidebar editor is recreated
|
||||
this._sidebarKey++;
|
||||
|
||||
await this._sidebarElement?.updateComplete;
|
||||
this._sidebarElement?.focus();
|
||||
@@ -537,6 +539,7 @@ export class HaManualScriptEditor extends LitElement {
|
||||
return;
|
||||
}
|
||||
this._sidebarConfig?.close();
|
||||
this._sidebarKey = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user