Commit 892e79a9 by Torkel Ödegaard

fix(table): another fix for table panel sorting, fixes #4544

parent 542e080f
...@@ -114,9 +114,13 @@ class TablePanelCtrl extends MetricsPanelCtrl { ...@@ -114,9 +114,13 @@ class TablePanelCtrl extends MetricsPanelCtrl {
} }
} }
this.render();
}
render() {
this.table = transformDataToTable(this.dataRaw, this.panel); this.table = transformDataToTable(this.dataRaw, this.panel);
this.table.sort(this.panel.sort); this.table.sort(this.panel.sort);
this.render(this.table); return super.render(this.table);
} }
toggleColumnSort(col, colIndex) { toggleColumnSort(col, colIndex) {
...@@ -130,10 +134,7 @@ class TablePanelCtrl extends MetricsPanelCtrl { ...@@ -130,10 +134,7 @@ class TablePanelCtrl extends MetricsPanelCtrl {
this.panel.sort.col = colIndex; this.panel.sort.col = colIndex;
this.panel.sort.desc = true; this.panel.sort.desc = true;
} }
this.render();
this.table = transformDataToTable(this.dataRaw, this.panel);
this.table.sort(this.panel.sort);
this.render(this.table);
} }
exportCsv() { exportCsv() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment