From 49fe4ff69ec128c10dadb5379baa782cd4b6fac6 Mon Sep 17 00:00:00 2001 From: Miguel Carvajal Date: Thu, 20 Feb 2020 07:11:42 +0100 Subject: [PATCH] Annotations: Call panel refresh when table transform changes to annotations (#22323) --- public/app/plugins/panel/table/editor.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/public/app/plugins/panel/table/editor.ts b/public/app/plugins/panel/table/editor.ts index 766f3ce11d7..f81d70b9517 100644 --- a/public/app/plugins/panel/table/editor.ts +++ b/public/app/plugins/panel/table/editor.ts @@ -67,12 +67,16 @@ export class TablePanelEditorCtrl { transformChanged() { this.panel.columns = []; - if (this.panel.transform === 'timeseries_aggregations') { - this.panel.columns.push({ text: 'Avg', value: 'avg' }); - } + if (this.panel.transform === 'annotations') { + this.panelCtrl.refresh(); + } else { + if (this.panel.transform === 'timeseries_aggregations') { + this.panel.columns.push({ text: 'Avg', value: 'avg' }); + } - this.updateTransformHints(); - this.render(); + this.updateTransformHints(); + this.render(); + } } render() {