mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 04:46:34 +00:00
Fix excessive rerendering of history charts (#8340)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
782b941531
commit
0f574a765b
@ -6,6 +6,7 @@ import {
|
||||
html,
|
||||
LitElement,
|
||||
property,
|
||||
PropertyValues,
|
||||
TemplateResult,
|
||||
} from "lit-element";
|
||||
import "./state-history-chart-line";
|
||||
@ -83,6 +84,10 @@ class StateHistoryCharts extends LitElement {
|
||||
`;
|
||||
}
|
||||
|
||||
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
||||
return !(changedProps.size === 1 && changedProps.has("hass"));
|
||||
}
|
||||
|
||||
private _isHistoryEmpty(): boolean {
|
||||
const historyDataEmpty =
|
||||
!this.historyData ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user