mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 13:26:34 +00:00
Fix Gallery menu expansion (#13408)
This commit is contained in:
parent
088b3587e0
commit
f3d92ba0e0
@ -5,7 +5,7 @@ import { html, css, LitElement, PropertyValues } from "lit";
|
||||
import { customElement, property, query } from "lit/decorators";
|
||||
import "../../src/components/ha-icon-button";
|
||||
import "../../src/managers/notification-manager";
|
||||
import "../../src/components/ha-expansion-panel";
|
||||
import { HaExpansionPanel } from "../../src/components/ha-expansion-panel";
|
||||
import { haStyle } from "../../src/resources/styles";
|
||||
import { PAGES, SIDEBAR } from "../build/import-pages";
|
||||
import { dynamicElement } from "../../src/common/dom/dynamic-element-directive";
|
||||
@ -174,9 +174,10 @@ class HaGallery extends LitElement {
|
||||
const menuItem = this.shadowRoot!.querySelector(
|
||||
`a[href="#${this._page}"]`
|
||||
)!;
|
||||
|
||||
// Make sure section is expanded
|
||||
if (menuItem.parentElement instanceof HTMLDetailsElement) {
|
||||
menuItem.parentElement.open = true;
|
||||
if (menuItem.parentElement instanceof HaExpansionPanel) {
|
||||
menuItem.parentElement.expanded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ import { nextRender } from "../common/util/render-status";
|
||||
import "./ha-svg-icon";
|
||||
|
||||
@customElement("ha-expansion-panel")
|
||||
class HaExpansionPanel extends LitElement {
|
||||
export class HaExpansionPanel extends LitElement {
|
||||
@property({ type: Boolean, reflect: true }) expanded = false;
|
||||
|
||||
@property({ type: Boolean, reflect: true }) outlined = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user