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') => {