mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-16 06:20:18 +00:00
Fix automation narrow bottom sheet close animation (#26850)
This commit is contained in:
@@ -170,6 +170,7 @@ export class HaManualScriptEditor extends LitElement {
|
||||
.disabled=${this.disabled}
|
||||
.narrow=${this.narrow}
|
||||
@open-sidebar=${this._openSidebar}
|
||||
@request-close-sidebar=${this._triggerCloseSidebar}
|
||||
@close-sidebar=${this._handleCloseSidebar}
|
||||
></ha-script-fields>`
|
||||
: nothing
|
||||
@@ -200,6 +201,7 @@ export class HaManualScriptEditor extends LitElement {
|
||||
.highlightedActions=${this._pastedConfig?.sequence || []}
|
||||
@value-changed=${this._sequenceChanged}
|
||||
@open-sidebar=${this._openSidebar}
|
||||
@request-close-sidebar=${this._triggerCloseSidebar}
|
||||
@close-sidebar=${this._handleCloseSidebar}
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
@@ -506,11 +508,13 @@ export class HaManualScriptEditor extends LitElement {
|
||||
};
|
||||
}
|
||||
|
||||
private _closeSidebar() {
|
||||
private _triggerCloseSidebar() {
|
||||
if (this._sidebarConfig) {
|
||||
const closeRow = this._sidebarConfig?.close;
|
||||
this._sidebarConfig = undefined;
|
||||
closeRow?.();
|
||||
if (this._sidebarElement) {
|
||||
this._sidebarElement.triggerCloseSidebar();
|
||||
return;
|
||||
}
|
||||
this._sidebarConfig?.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,7 +523,7 @@ export class HaManualScriptEditor extends LitElement {
|
||||
}
|
||||
|
||||
private _saveScript() {
|
||||
this._closeSidebar();
|
||||
this._triggerCloseSidebar();
|
||||
fireEvent(this, "save-script");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user