From 7eb820081d14f641a84617b03759c083cc9ba0b2 Mon Sep 17 00:00:00 2001 From: Tobias Skarhed Date: Wed, 19 Jun 2019 13:12:04 +0200 Subject: [PATCH] AddPanel: Fix issue when removing moved add panel widget (#17659) * Fixes #17592 * Remove console.log --- .../dashboard/components/AddPanelWidget/AddPanelWidget.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx b/public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx index c6764ffd9ef..9bd455e165f 100644 --- a/public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx +++ b/public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx @@ -60,7 +60,7 @@ export class AddPanelWidget extends React.Component { handleCloseAddPanel(evt) { evt.preventDefault(); - this.props.dashboard.removePanel(this.props.dashboard.panels[0]); + this.props.dashboard.removePanel(this.props.panel); } onCreateNewPanel = (tab = 'queries') => {