Handle qp clear input correctly (#3258)

* handle clearing xml in qp view

* formatting
This commit is contained in:
Anthony Dresser
2018-11-26 14:49:06 -08:00
committed by GitHub
parent 8925d44807
commit e48328af34

View File

@@ -103,6 +103,7 @@ export class QueryPlan {
public set xml(xml: string) { public set xml(xml: string) {
this._xml = xml; this._xml = xml;
new Builder(this.container).empty(); new Builder(this.container).empty();
if (this.xml) {
QP.showPlan(this.container, this._xml, { QP.showPlan(this.container, this._xml, {
jsTooltips: false jsTooltips: false
}); });
@@ -111,6 +112,7 @@ export class QueryPlan {
toolTip.classList.add('monaco-editor-hover'); toolTip.classList.add('monaco-editor-hover');
}); });
} }
}
public get xml(): string { public get xml(): string {
return this._xml; return this._xml;