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

@@ -98,7 +98,11 @@ export class MainThreadModelViewDialog extends Disposable implements MainThreadM
options.renderHeader = dialog.renderHeader;
options.renderFooter = dialog.renderFooter;
options.dialogProperties = dialog.dialogProperties;
this._dialogService.showDialog(dialog, dialogName, options);
const modal = this._dialogService.showDialog(dialog, dialogName, options);
const onClosed = modal.onClosed(reason => {
this._proxy.$onClosed(handle, reason);
onClosed.dispose();
});
return Promise.resolve();
}