Rebuild stack card when a child card rebuilds (#19861)

This commit is contained in:
karwosts 2024-04-12 11:53:04 -07:00 committed by GitHub
parent b82f1128fe
commit b35c325f43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import {
nothing,
} from "lit";
import { property, state } from "lit/decorators";
import { fireEvent } from "../../../common/dom/fire_event";
import { LovelaceCardConfig } from "../../../data/lovelace/config/card";
import { HomeAssistant } from "../../../types";
import { createCardElement } from "../create-element/create-card-element";
@ -119,6 +120,7 @@ export abstract class HuiStackCard<T extends StackCardConfig = StackCardConfig>
(ev) => {
ev.stopPropagation();
this._rebuildCard(element, cardConfig);
fireEvent(this, "ll-rebuild");
},
{ once: true }
);