From 6d4d7c50329ca03104849ede5ac4dafadb7bc382 Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Mon, 12 Nov 2018 11:38:41 +0100 Subject: [PATCH] wip: panel-header: On panel refresh, get new timeRange from timeSrv, not the old one from the state --- public/app/features/dashboard/dashgrid/PanelChrome.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/PanelChrome.tsx b/public/app/features/dashboard/dashgrid/PanelChrome.tsx index ab6f5e3c3b2..79af541769a 100644 --- a/public/app/features/dashboard/dashgrid/PanelChrome.tsx +++ b/public/app/features/dashboard/dashgrid/PanelChrome.tsx @@ -67,10 +67,9 @@ export class PanelChrome extends PureComponent { return; } - const { timeRange } = this.state; const { panel } = this.props; + const timeRange = this.timeSrv.timeRange(); const timeData = applyPanelTimeOverrides(panel, timeRange); - const resolution = getResolution(panel); const interval = calculateInterval(panel, panel.datasource, timeData.timeRange, resolution);