Forráskód Böngészése

AddPanel: Fix issue when removing moved add panel widget (#17659)

* Fixes #17592

* Remove console.log
Tobias Skarhed 6 éve
szülő
commit
7eb820081d

+ 1 - 1
public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx

@@ -60,7 +60,7 @@ export class AddPanelWidget extends React.Component<Props, State> {
 
   handleCloseAddPanel(evt) {
     evt.preventDefault();
-    this.props.dashboard.removePanel(this.props.dashboard.panels[0]);
+    this.props.dashboard.removePanel(this.props.panel);
   }
 
   onCreateNewPanel = (tab = 'queries') => {