clear the widget error every time it refreshes (#1306)

* clear the widget error every time it refreshes

* address comments
This commit is contained in:
Abbie Petchtes
2018-05-01 15:00:19 -07:00
committed by GitHub
parent 96657e300a
commit 31328e79be

View File

@@ -202,6 +202,8 @@ export class InsightsWidget extends DashboardWidget implements IDashboardWidget,
private _updateChild(result: SimpleExecuteResult): void {
this.componentHost.viewContainerRef.clear();
this.error = undefined;
this._cd.detectChanges();
if (result.rowCount === 0) {
this.showError(nls.localize('noResults', 'No results to show'));