From c7d2d7079905e8101be4e883bb9890f7f40819ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 11 Jul 2021 07:35:27 +0200 Subject: [PATCH] DashboardList: Fix issue not re-fetching dashboard list after variable change (#36591) --- public/app/features/dashboard/dashgrid/PanelChrome.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/PanelChrome.tsx b/public/app/features/dashboard/dashgrid/PanelChrome.tsx index 64992fccafb..63418eb2eb7 100644 --- a/public/app/features/dashboard/dashgrid/PanelChrome.tsx +++ b/public/app/features/dashboard/dashgrid/PanelChrome.tsx @@ -250,9 +250,10 @@ export class PanelChrome extends Component { panel.runAllPanelQueries(this.props.dashboard.id, this.props.dashboard.getTimezone(), timeData, width); } else { // The panel should render on refresh as well if it doesn't have a query, like clock panel - this.setState((prevState) => ({ - data: { ...prevState.data, timeRange: this.timeSrv.timeRange() }, - })); + this.setState({ + data: { ...this.state.data, timeRange: this.timeSrv.timeRange() }, + renderCounter: this.state.renderCounter + 1, + }); } };