diff --git a/src/app/topic/indicators.component.ts b/src/app/topic/indicators.component.ts index 789b12e..fc20662 100644 --- a/src/app/topic/indicators.component.ts +++ b/src/app/topic/indicators.component.ts @@ -111,15 +111,13 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV })); this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { this.stakeholder = stakeholder; - if (this.stakeholder) { + if (this.stakeholder && this.firstLoad) { this.buildFilters(); this.buildSections(); - if(this.firstLoad) { - this.filterCharts(); - this.filterNumbers(); - this.firstLoad = false; - } + this.filterCharts(); + this.filterNumbers(); this.setPreview(); + this.firstLoad = false; } })); } @@ -146,6 +144,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV ngOnChanges(changes: SimpleChanges): void { if (this.canEdit) { if (changes.topicIndex || changes.categoryIndex || changes.subcategoryIndex) { + this.buildSections(); this.buildFilters(); this.initReorder(); }