Fix hidden entity filter card in section (#20117)
This commit is contained in:
parent
8a4ed121b5
commit
cbc150bad2
|
@ -151,6 +151,7 @@ export class HuiEntityFilterCard
|
|||
|
||||
if (entitiesList.length === 0 && this._config.show_empty === false) {
|
||||
this.style.display = "none";
|
||||
this.toggleAttribute("hidden", true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -181,6 +182,7 @@ export class HuiEntityFilterCard
|
|||
}
|
||||
|
||||
this.style.display = "block";
|
||||
this.toggleAttribute("hidden", false);
|
||||
}
|
||||
|
||||
private _haveEntitiesChanged(oldHass: HomeAssistant | null): boolean {
|
||||
|
|
|
@ -33,8 +33,6 @@ export class HuiConditionalBase extends ReactiveElement {
|
|||
|
||||
@property({ type: Boolean }) public editMode = false;
|
||||
|
||||
@property({ type: Boolean, reflect: true }) public hidden = false;
|
||||
|
||||
@state() protected _config?: ConditionalCardConfig | ConditionalRowConfig;
|
||||
|
||||
protected _element?: LovelaceCard | LovelaceRow;
|
||||
|
@ -151,7 +149,7 @@ export class HuiConditionalBase extends ReactiveElement {
|
|||
return;
|
||||
}
|
||||
const visible = this.editMode || conditionMet;
|
||||
this.hidden = !visible;
|
||||
this.toggleAttribute("hidden", !visible);
|
||||
this.style.setProperty("display", visible ? "" : "none");
|
||||
|
||||
if (visible) {
|
||||
|
|
Loading…
Reference in New Issue