mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
Don't render cards when pane not visible
This commit is contained in:
@@ -128,20 +128,27 @@
|
||||
type: Object,
|
||||
},
|
||||
|
||||
paneVisible: {
|
||||
type: Boolean,
|
||||
},
|
||||
|
||||
cards: {
|
||||
type: Object,
|
||||
},
|
||||
},
|
||||
|
||||
observers: [
|
||||
'updateCards(columns, states, showIntroduction)',
|
||||
'updateCards(columns, states, showIntroduction, paneVisible)',
|
||||
],
|
||||
|
||||
updateCards: function (columns, states, showIntroduction) {
|
||||
updateCards: function (columns, states, showIntroduction, paneVisible) {
|
||||
if (!paneVisible) {
|
||||
return;
|
||||
}
|
||||
this.debounce(
|
||||
'updateCards',
|
||||
function () { this.cards = this.computeCards(columns, states, showIntroduction); },
|
||||
0
|
||||
function () { this.cards = this.computeCards(columns, states,
|
||||
showIntroduction); }
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user