Stop clearing out connecting and connected state when cancelling out of connection dialog (#7254)

* Stop clearing out connecting and connected state

* tweaks

* Handling cancel while connecting

* fix typo

* PR comments
This commit is contained in:
Chris LaFreniere
2019-09-18 17:21:32 -07:00
committed by GitHub
parent b3fbb29bf2
commit a584aca969

View File

@@ -302,9 +302,13 @@ export class QueryInput extends EditorInput implements IEncodingSupport, IConnec
} }
public onConnectCanceled(): void { public onConnectCanceled(): void {
this.state.connecting = false; // If we're currently connecting and then cancel, set connected state to false
// Otherwise, keep connected state as it was
if (this.state.connecting) {
this.state.connected = false; this.state.connected = false;
} }
this.state.connecting = false;
}
public onConnectSuccess(params?: INewConnectionParams): void { public onConnectSuccess(params?: INewConnectionParams): void {
this.state.connected = true; this.state.connected = true;