Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/components/ha-sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ class HaSidebar extends LitElement {

private async _hidePanel(ev: Event) {
ev.preventDefault();
const panel = (ev.target as any).panel;
const panel = (ev.currentTarget as any).panel;
if (this._hiddenPanels.includes(panel)) {
return;
}
Expand Down Expand Up @@ -692,12 +692,13 @@ class HaSidebar extends LitElement {
: html`<ha-icon slot="item-icon" .icon=${icon}></ha-icon>`}
<span class="item-text">${title}</span>
${this._editMode
? html`<ha-svg-icon
? html`<mwc-icon-button
class="hide-panel"
.panel=${urlPath}
@click=${this._hidePanel}
.path=${mdiClose}
></ha-svg-icon>`
>
<ha-svg-icon .path=${mdiClose}></ha-svg-icon>
</mwc-icon-button>`
: ""}
</paper-icon-item>
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/resources/ha-sortable-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const sortableStyles = css`
.hide-panel {
display: none;
position: absolute;
right: 8px;
right: 0;
}

:host([expanded]) .hide-panel {
Expand Down