replace deprecated onDidClick() handler in sql projects (#22721)

This commit is contained in:
Kim Santiago
2023-04-13 16:27:59 -07:00
committed by GitHub
parent 87571b2706
commit 3deb163210
2 changed files with 22 additions and 12 deletions

View File

@@ -206,8 +206,10 @@ export class AddDatabaseReferenceDialog {
label: constants.projectLabel label: constants.projectLabel
}).component(); }).component();
this.projectRadioButton.onDidClick(() => { this.projectRadioButton.onDidChangeCheckedState((checked) => {
this.projectRadioButtonClick(); if (checked) {
this.projectRadioButtonClick();
}
}); });
this.systemDatabaseRadioButton = this.view!.modelBuilder.radioButton() this.systemDatabaseRadioButton = this.view!.modelBuilder.radioButton()
@@ -216,8 +218,10 @@ export class AddDatabaseReferenceDialog {
label: constants.systemDatabase label: constants.systemDatabase
}).component(); }).component();
this.systemDatabaseRadioButton.onDidClick(() => { this.systemDatabaseRadioButton.onDidChangeCheckedState((checked) => {
this.systemDbRadioButtonClick(); if (checked) {
this.systemDbRadioButtonClick();
}
}); });
const dacpacRadioButton = this.view!.modelBuilder.radioButton() const dacpacRadioButton = this.view!.modelBuilder.radioButton()
@@ -226,8 +230,10 @@ export class AddDatabaseReferenceDialog {
label: constants.dacpacText label: constants.dacpacText
}).component(); }).component();
dacpacRadioButton.onDidClick(() => { dacpacRadioButton.onDidChangeCheckedState((checked) => {
this.dacpacRadioButtonClick(); if (checked) {
this.dacpacRadioButtonClick();
}
}); });
if (this.projectDropdown?.values?.length) { if (this.projectDropdown?.values?.length) {

View File

@@ -481,14 +481,18 @@ export class UpdateProjectFromDatabaseDialog {
await this.compareActionRadioButton.updateProperties({ checked: true }); await this.compareActionRadioButton.updateProperties({ checked: true });
this.action = UpdateProjectAction.Compare; this.action = UpdateProjectAction.Compare;
this.compareActionRadioButton.onDidClick(async () => { this.compareActionRadioButton.onDidChangeCheckedState((checked) => {
this.action = UpdateProjectAction.Compare; if (checked) {
this.tryEnableUpdateButton(); this.action = UpdateProjectAction.Compare;
this.tryEnableUpdateButton();
}
}); });
this.updateActionRadioButton.onDidClick(async () => { this.updateActionRadioButton.onDidChangeCheckedState((checked) => {
this.action = UpdateProjectAction.Update; if (checked) {
this.tryEnableUpdateButton(); this.action = UpdateProjectAction.Update;
this.tryEnableUpdateButton();
}
}); });
let radioButtons = view.modelBuilder.flexContainer() let radioButtons = view.modelBuilder.flexContainer()