Fixed error when changing sources
@@ -413,7 +413,7 @@ export class TablePropertiesComponent implements OnChanges, OnInit {
* return the list of tables for the selected Service ID
*/
private queryTablesSearch(query: string): Observable<any[]> {
- if (this.dbConnectionProperty == null || this.dbConnectionProperty.value == null) {
+ if (this.dbConnectionProperty == null || this.dbConnectionProperty.value == null || this.dbConnectionProperty.value == "") {
return of([]);
} else if (this.dbConnectionProperty in this.allTables) {
return query ? this.allTables[this.dbConnectionProperty].filter(this.createFilterForTable(query)) : [];
@@ -614,6 +614,7 @@ export class TablePropertiesComponent implements OnChanges, OnInit {
}
private initializeAutoComplete() {
+ if (this.dbConnectionProperty != null && this.dbConnectionProperty.value != null && this.dbConnectionProperty.value != "") {
const processorTableName = this.model.table.existingTableName;
this.tableControl.setValue(processorTableName);
if (processorTableName != null) {
@@ -622,3 +623,4 @@ export class TablePropertiesComponent implements OnChanges, OnInit {
}
}
}
+}
