mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
fix dacpac dropdowns selecting first db in dropdown instead of right clicked db (#14285)
This commit is contained in:
@@ -40,8 +40,13 @@ export abstract class DacFxConfigPage extends BasePage {
|
|||||||
|
|
||||||
// Handle server changes
|
// Handle server changes
|
||||||
this.serverDropdown.onValueChanged(async () => {
|
this.serverDropdown.onValueChanged(async () => {
|
||||||
this.model.server = (this.serverDropdown.value as ConnectionDropdownValue).connection;
|
const serverDropdownValue = this.serverDropdown.value as ConnectionDropdownValue;
|
||||||
this.model.serverName = (this.serverDropdown.value as ConnectionDropdownValue).displayName;
|
if (!serverDropdownValue) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.model.server = serverDropdownValue.connection;
|
||||||
|
this.model.serverName = serverDropdownValue.displayName;
|
||||||
if (this.databaseDropdown) {
|
if (this.databaseDropdown) {
|
||||||
await this.populateDatabaseDropdown();
|
await this.populateDatabaseDropdown();
|
||||||
} else {
|
} else {
|
||||||
@@ -98,8 +103,13 @@ export abstract class DacFxConfigPage extends BasePage {
|
|||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
// Handle database changes
|
// Handle database changes
|
||||||
this.databaseDropdown.onValueChanged(async () => {
|
this.databaseDropdown.onValueChanged(() => {
|
||||||
this.model.database = <string>this.databaseDropdown.value;
|
const databaseDropdownValue = this.databaseDropdown.value;
|
||||||
|
if (!databaseDropdownValue) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.model.database = databaseDropdownValue as string;
|
||||||
this.fileTextBox.value = this.generateFilePathFromDatabaseAndTimestamp();
|
this.fileTextBox.value = this.generateFilePathFromDatabaseAndTimestamp();
|
||||||
this.model.filePath = this.fileTextBox.value;
|
this.model.filePath = this.fileTextBox.value;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ export class DataTierApplicationWizard {
|
|||||||
private cancelDataTierApplicationWizard(): void {
|
private cancelDataTierApplicationWizard(): void {
|
||||||
TelemetryReporter.createActionEvent(TelemetryViews.DataTierApplicationWizard, 'WizardCanceled')
|
TelemetryReporter.createActionEvent(TelemetryViews.DataTierApplicationWizard, 'WizardCanceled')
|
||||||
.withAdditionalProperties({
|
.withAdditionalProperties({
|
||||||
isPotentialDataLoss: this.model.potentialDataLoss.toString()
|
isPotentialDataLoss: this.model.potentialDataLoss?.toString()
|
||||||
}).send();
|
}).send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,8 +141,13 @@ export class DeployConfigPage extends DacFxConfigPage {
|
|||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
//Handle database changes
|
//Handle database changes
|
||||||
this.databaseDropdown.onValueChanged(async () => {
|
this.databaseDropdown.onValueChanged(() => {
|
||||||
this.model.database = (<azdata.CategoryValue>this.databaseDropdown.value).name;
|
const databaseDropdownValue = this.databaseDropdown.value as azdata.CategoryValue;
|
||||||
|
if (!databaseDropdownValue) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.model.database = databaseDropdownValue.name;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.databaseLoader = this.view.modelBuilder.loadingComponent().withItem(this.databaseDropdown).withProperties({
|
this.databaseLoader = this.view.modelBuilder.loadingComponent().withItem(this.databaseDropdown).withProperties({
|
||||||
|
|||||||
Reference in New Issue
Block a user