Skip to content

Commit e147b40

Browse files
vik-13mgechev
authored andcommitted
fix: run change detection when settings are changed
1 parent 05e4588 commit e147b40

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/app/app.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,13 @@ export class AppComponent implements AfterViewInit, OnDestroy {
8181
this._ipcBus.on(Message.ToggleLibsMenuAction, () => {
8282
this.manager.toggleLibs().then(() => {
8383
this.manager.reloadAppState();
84+
this._cd.detectChanges();
8485
});
8586
});
8687
this._ipcBus.on(Message.ToggleModulesMenuAction, () => {
8788
this.manager.toggleModules().then(() => {
8889
this.manager.reloadAppState();
90+
this._cd.detectChanges();
8991
});
9092
});
9193
}
@@ -142,7 +144,9 @@ the Angular's AoT compiler. Error during parsing:\n\n${formatError(error)}`
142144
}
143145

144146
get initialized(): VisualizationConfig<any> | null {
145-
return this.manager.getCurrentState();
147+
return this.manager.getCurrentState(() => {
148+
this._cd.detectChanges();
149+
});
146150
}
147151

148152
prevState(): void {

0 commit comments

Comments
 (0)