Scopes: Add extra-check for fetching dashboards (#91896)

pull/91900/head
Bogdan Matei 11 months ago committed by GitHub
parent e9bb3b4d73
commit b0dd3fb1a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      public/app/features/scopes/internal/ScopesDashboardsScene.tsx

@ -47,7 +47,7 @@ export class ScopesDashboardsScene extends SceneObjectBase<ScopesDashboardsScene
});
this.addActivationHandler(() => {
if (this.state.isPanelOpened) {
if (this.state.isEnabled && this.state.isPanelOpened) {
this.fetchDashboards();
}
@ -57,6 +57,7 @@ export class ScopesDashboardsScene extends SceneObjectBase<ScopesDashboardsScene
this._subs.add(
resolvedSelector.subscribeToState((newState, prevState) => {
if (
this.state.isEnabled &&
this.state.isPanelOpened &&
!newState.isLoadingScopes &&
(prevState.isLoadingScopes || newState.scopes !== prevState.scopes)

Loading…
Cancel
Save