mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +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);
|
||||
if (changedProps.has("expanded") && this.expanded) {
|
||||
this._showContent = this.expanded;
|
||||
setTimeout(() => {
|
||||
// Verify we're still expanded
|
||||
if (this.expanded) {
|
||||
this._container.style.overflow = "initial";
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
|
||||
private _handleTransitionEnd() {
|
||||
this._container.style.removeProperty("height");
|
||||
this._container.style.overflow = this.expanded ? "initial" : "hidden";
|
||||
this._showContent = this.expanded;
|
||||
}
|
||||
|
||||
@ -103,6 +110,7 @@ export class HaExpansionPanel extends LitElement {
|
||||
ev.preventDefault();
|
||||
const newExpanded = !this.expanded;
|
||||
fireEvent(this, "expanded-will-change", { expanded: newExpanded });
|
||||
this._container.style.overflow = "hidden";
|
||||
|
||||
if (newExpanded) {
|
||||
this._showContent = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user