Notebooks: Fix Cancel for Connection Dialog to Actually Close Window (#8626)

* Fix connection dialog not going away on cancel

* Remove unnecessary change
This commit is contained in:
Chris LaFreniere
2019-12-10 16:59:15 -08:00
committed by GitHub
parent 36fd618ed4
commit bceb766d28

View File

@@ -364,8 +364,10 @@ export class AttachToDropdown extends SelectBox {
let attachToConnections = this.values;
if (!connection) {
this.loadAttachToDropdown(this.model, this.getKernelDisplayName());
this.doChangeContext(undefined, true);
// If there is no connection, we should choose the previous connection,
// which will always be the first item in the list. Either "Select Connection"
// or a real connection name
this.select(0);
return false;
}
let connectionUri = this._connectionManagementService.getConnectionUri(connection);