Add onClosed event to ModelView dialogs (#17531)

* Add onClosed event to ModelView dialogs

* Use defined type

* Fix compile

* fix tests

* fix tests2

* Remove unused
This commit is contained in:
Charles Gagnon
2021-10-28 20:53:20 -07:00
committed by GitHub
parent 62b6e781ce
commit 82805638ad
12 changed files with 82 additions and 15 deletions

View File

@@ -579,6 +579,11 @@ declare module 'azdata' {
export namespace window {
/**
* The reason that the dialog was closed
*/
export type CloseReason = 'close' | 'cancel' | 'ok';
export interface Dialog {
/**
* Width of the dialog.
@@ -610,6 +615,11 @@ declare module 'azdata' {
* Default is undefined.
*/
dialogProperties?: IDialogProperties;
/**
* Fired when the dialog is closed for any reason. The value indicates the reason it was closed (such as 'ok' or 'cancel')
*/
onClosed: vscode.Event<CloseReason>;
}
export interface Wizard {