mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 13:56:35 +00:00
Do not hide overflow in expansion panel when expanded (#13423)
This commit is contained in:
parent
209ba79823
commit
5ecde44243
@ -85,11 +85,18 @@ export class HaExpansionPanel extends LitElement {
|
|||||||
super.willUpdate(changedProps);
|
super.willUpdate(changedProps);
|
||||||
if (changedProps.has("expanded") && this.expanded) {
|
if (changedProps.has("expanded") && this.expanded) {
|
||||||
this._showContent = this.expanded;
|
this._showContent = this.expanded;
|
||||||
|
setTimeout(() => {
|
||||||
|
// Verify we're still expanded
|
||||||
|
if (this.expanded) {
|
||||||
|
this._container.style.overflow = "initial";
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _handleTransitionEnd() {
|
private _handleTransitionEnd() {
|
||||||
this._container.style.removeProperty("height");
|
this._container.style.removeProperty("height");
|
||||||
|
this._container.style.overflow = this.expanded ? "initial" : "hidden";
|
||||||
this._showContent = this.expanded;
|
this._showContent = this.expanded;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,6 +110,7 @@ export class HaExpansionPanel extends LitElement {
|
|||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
const newExpanded = !this.expanded;
|
const newExpanded = !this.expanded;
|
||||||
fireEvent(this, "expanded-will-change", { expanded: newExpanded });
|
fireEvent(this, "expanded-will-change", { expanded: newExpanded });
|
||||||
|
this._container.style.overflow = "hidden";
|
||||||
|
|
||||||
if (newExpanded) {
|
if (newExpanded) {
|
||||||
this._showContent = true;
|
this._showContent = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user