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