From 12ceff407b16142371d2af9bc756719966ff057f Mon Sep 17 00:00:00 2001 From: kay delaney <45561153+kaydelaney@users.noreply.github.com> Date: Tue, 13 Apr 2021 16:55:55 +0100 Subject: [PATCH] AnnoListPanel: Fix 'Within Time Range' option (#32439) --- public/app/features/dashboard/dashgrid/PanelChrome.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard/dashgrid/PanelChrome.tsx b/public/app/features/dashboard/dashgrid/PanelChrome.tsx index 8b4b3a79aad..14384eb4e44 100644 --- a/public/app/features/dashboard/dashgrid/PanelChrome.tsx +++ b/public/app/features/dashboard/dashgrid/PanelChrome.tsx @@ -209,7 +209,9 @@ export class PanelChrome extends Component { }); } else { // The panel should render on refresh as well if it doesn't have a query, like clock panel - this.onRender(); + this.setState((prevState) => ({ + data: { ...prevState.data, timeRange: this.timeSrv.timeRange() }, + })); } };