Fix card display in view panel (#20972)

This commit is contained in:
Paul Bottein 2024-06-03 15:49:31 +02:00 committed by GitHub
parent d9a9038cec
commit c08d9a9166
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,6 +18,8 @@ export class HuiCard extends ReactiveElement {
@property({ attribute: false }) public lovelace!: Lovelace; @property({ attribute: false }) public lovelace!: Lovelace;
@property({ attribute: false }) public isPanel = false;
@state() public _config?: LovelaceCardConfig; @state() public _config?: LovelaceCardConfig;
private _element?: LovelaceCard; private _element?: LovelaceCard;
@ -93,6 +95,9 @@ export class HuiCard extends ReactiveElement {
if (changedProperties.has("hass") || changedProperties.has("lovelace")) { if (changedProperties.has("hass") || changedProperties.has("lovelace")) {
this._updateElement(); this._updateElement();
} }
if (changedProperties.has("isPanel")) {
this._element.isPanel = this.isPanel;
}
} }
} }