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,13 +103,15 @@ 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();
QP.showPlan(this.container, this._xml, { if (this.xml) {
jsTooltips: false QP.showPlan(this.container, this._xml, {
}); jsTooltips: false
(<any>this.container.querySelectorAll('div.qp-tt')).forEach(toolTip => { });
toolTip.classList.add('monaco-editor'); (<any>this.container.querySelectorAll('div.qp-tt')).forEach(toolTip => {
toolTip.classList.add('monaco-editor-hover'); toolTip.classList.add('monaco-editor');
}); toolTip.classList.add('monaco-editor-hover');
});
}
} }
public get xml(): string { public get xml(): string {