From 3805f72b6a8183aefaa7694d498f5b16d071afe8 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Fri, 18 Jun 2021 03:12:39 -0400 Subject: [PATCH] Dashboard: Fixes blank / empty panels after duplicate and add library panel (#35906) (#35924) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 333932812df5b22d46a9c9a2c879e8ee33af09d0) Co-authored-by: Torkel Ödegaard --- public/app/features/dashboard/dashgrid/DashboardGrid.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx index 365caab319d..fbc56b92ffb 100644 --- a/public/app/features/dashboard/dashgrid/DashboardGrid.tsx +++ b/public/app/features/dashboard/dashgrid/DashboardGrid.tsx @@ -162,11 +162,7 @@ export class DashboardGrid extends PureComponent { } this.props.dashboard.sortPanelsByGridPos(); - - // onLayoutChange is called onMount this marks layout as initialized and we are ready to render panels - if (!this.state.isLayoutInitialized) { - this.setState({ isLayoutInitialized: true }); - } + this.forceUpdate(); }; triggerForceUpdate = () => {