mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix non-hass shouldUpdate regressions (#18810)
This commit is contained in:
parent
4ec11c7cf6
commit
bf24740c7b
@ -151,10 +151,11 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
||||||
if (changedProps.has("_stateHistory")) {
|
return (
|
||||||
return true;
|
hasConfigOrEntitiesChanged(this, changedProps) ||
|
||||||
}
|
changedProps.size > 1 ||
|
||||||
return hasConfigOrEntitiesChanged(this, changedProps);
|
!changedProps.has("hass")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected updated(changedProps: PropertyValues) {
|
protected updated(changedProps: PropertyValues) {
|
||||||
|
@ -330,7 +330,11 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
||||||
return hasConfigOrEntityChanged(this, changedProps);
|
return (
|
||||||
|
hasConfigOrEntityChanged(this, changedProps) ||
|
||||||
|
changedProps.size > 1 ||
|
||||||
|
!changedProps.has("hass")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected firstUpdated(): void {
|
protected firstUpdated(): void {
|
||||||
|
@ -129,10 +129,11 @@ export class HuiStatisticsGraphCard extends LitElement implements LovelaceCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
||||||
if (changedProps.has("_statistics")) {
|
return (
|
||||||
return true;
|
hasConfigOrEntitiesChanged(this, changedProps) ||
|
||||||
}
|
changedProps.size > 1 ||
|
||||||
return hasConfigOrEntitiesChanged(this, changedProps);
|
!changedProps.has("hass")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public willUpdate(changedProps: PropertyValues) {
|
public willUpdate(changedProps: PropertyValues) {
|
||||||
|
@ -155,7 +155,8 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
|||||||
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
||||||
return (
|
return (
|
||||||
hasConfigOrEntityChanged(this, changedProps) ||
|
hasConfigOrEntityChanged(this, changedProps) ||
|
||||||
changedProps.has("forecastEvent")
|
changedProps.size > 1 ||
|
||||||
|
!changedProps.has("hass")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,11 @@ class HuiMediaPlayerEntityRow extends LitElement implements LovelaceRow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
||||||
return hasConfigOrEntityChanged(this, changedProps);
|
return (
|
||||||
|
hasConfigOrEntityChanged(this, changedProps) ||
|
||||||
|
changedProps.size > 1 ||
|
||||||
|
!changedProps.has("hass")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
|
@ -90,7 +90,11 @@ class HuiWeatherEntityRow extends LitElement implements LovelaceRow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
protected shouldUpdate(changedProps: PropertyValues): boolean {
|
||||||
return hasConfigOrEntityChanged(this, changedProps);
|
return (
|
||||||
|
hasConfigOrEntityChanged(this, changedProps) ||
|
||||||
|
changedProps.size > 1 ||
|
||||||
|
!changedProps.has("hass")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected updated(changedProps: PropertyValues): void {
|
protected updated(changedProps: PropertyValues): void {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user