mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dashboards: fix keyboard shortcut for remove panel
This commit is contained in:
@@ -171,8 +171,9 @@ export class KeybindingSrv {
|
||||
// delete panel
|
||||
this.bind('p r', () => {
|
||||
if (dashboard.meta.focusPanelId && dashboard.meta.canEdit) {
|
||||
var panelInfo = dashboard.getPanelInfoById(dashboard.meta.focusPanelId);
|
||||
panelInfo.row.removePanel(panelInfo.panel);
|
||||
this.$rootScope.appEvent('panel-remove', {
|
||||
panelId: dashboard.meta.focusPanelId,
|
||||
});
|
||||
dashboard.meta.focusPanelId = 0;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user