diff --git a/src/components/ha-clickable-list-item.ts b/src/components/ha-clickable-list-item.ts index 5e02d4efb5..11a18caca4 100644 --- a/src/components/ha-clickable-list-item.ts +++ b/src/components/ha-clickable-list-item.ts @@ -6,6 +6,8 @@ import { html } from "lit-html"; export class HaClickableListItem extends ListItem { public href?: string; + public disableHref = false; + // property used only in css @property({ type: Boolean, reflect: true }) public rtl = false; @@ -14,9 +16,9 @@ export class HaClickableListItem extends ListItem { const href = this.href ? `/${this.href}` : ""; return html` ${this.renderRipple()} - - ${r} - `; + ${this.disableHref + ? html`${r}` + : html`${r}`}`; } static get styles(): CSSResult[] { diff --git a/src/components/ha-sidebar.ts b/src/components/ha-sidebar.ts index 177a949769..dd99ea7935 100644 --- a/src/components/ha-sidebar.ts +++ b/src/components/ha-sidebar.ts @@ -47,6 +47,7 @@ import { actionHandler } from "../panels/lovelace/common/directives/action-handl import { haStyleScrollbar } from "../resources/styles"; import type { HomeAssistant, PanelInfo } from "../types"; import { ListItem } from "@material/mwc-list/mwc-list-item"; +import { navigate } from "../common/navigate"; const SHOW_AFTER_SPACER = ["config", "developer-tools", "hassio"]; @@ -603,7 +604,6 @@ class HaSidebar extends LitElement { animation: 150, fallbackClass: "sortable-fallback", dataIdAttr: "data-panel", - handle: "ha-clickable-list-item", onSort: async () => { this._panelOrder = this._sortable.toArray(); }, @@ -849,18 +849,19 @@ class HaSidebar extends LitElement { navigate(this, `/${urlPath}`)} graphic="icon" .rtl=${this.rtl} > ${iconPath ? html`` : html``} - - ${title} + ${title} ${this.editMode ? html`