Schema compare Icon and other fixes (#6009)

* Changes to 1. Enable Icon for Schema Compare model view editor 2. Set context setting in editable drop down 3. Fix a console error

* new icons

* Changes as per PR comments

* Adding PR comments

* Fixing a spelling mistake
This commit is contained in:
udeeshagautam
2019-06-14 13:28:46 -07:00
committed by GitHub
parent 363af2a85c
commit f494c7af4e
12 changed files with 109 additions and 24 deletions

View File

@@ -421,7 +421,8 @@ export class SchemaCompareDialog {
this.sourceServerDropdown.onValueChanged(async (value) => {
if (this.sourceServerDropdown.values.findIndex(x => this.matchesValue(x, value)) === -1) {
this.sourceDatabaseDropdown.updateProperties({
values: []
values: [],
value: ' '
});
}
else {
@@ -445,7 +446,8 @@ export class SchemaCompareDialog {
this.targetServerDropdown.onValueChanged(async (value) => {
if (this.targetServerDropdown.values.findIndex(x => this.matchesValue(x, value)) === -1) {
this.targetDatabaseDropdown.updateProperties({
values: []
values: [],
value: ' '
});
}
else {
@@ -463,9 +465,12 @@ export class SchemaCompareDialog {
let currentDropdown = isTarget ? this.targetServerDropdown : this.sourceServerDropdown;
let values = await this.getServerValues();
currentDropdown.updateProperties({
values: values
});
if (values && values.length > 0) {
currentDropdown.updateProperties({
values: values,
value: values[0]
});
}
}
protected async getServerValues(): Promise<{ connection: azdata.connection.Connection, displayName: string, name: string }[]> {
@@ -562,12 +567,15 @@ export class SchemaCompareDialog {
protected async populateDatabaseDropdown(connectionId: string, isTarget: boolean): Promise<void> {
let currentDropdown = isTarget ? this.targetDatabaseDropdown : this.sourceDatabaseDropdown;
currentDropdown.updateProperties({ values: [] });
currentDropdown.updateProperties({ values: [], value: null });
let values = await this.getDatabaseValues(connectionId);
currentDropdown.updateProperties({
values: values
});
if (values && values.length > 0) {
currentDropdown.updateProperties({
values: values,
value: values[0],
});
}
}
protected async getDatabaseValues(connectionId: string): Promise<{ displayName, name }[]> {