- this.dataSource = new CatalogDataSource(this.appMgrService, this.sort, this.notificationService );
- this.dataSource.loadTable();
+ this.dataSource = new CatalogDataSource(this.appMgrService, this.sort, this.notificationService);
+ this.ui.darkModeState.subscribe((isDark) => {
+ this.darkMode = isDark;
+ });
+
+ this.instanceChange = this.instanceSelectorService.getSelectedInstance().subscribe((instance: RicInstance) => {
+ if (instance.key) {
+ this.instanceKey = instance.key;
+ this.dataSource.loadTable(instance.key);
+ }
+ });
+ }
+
+ ngOnDestroy() {
+ this.instanceChange.unsubscribe();