KeybindingSrv: Prevent dashboard save modal when dashboard cannot be saved (#42505)

This commit is contained in:
Dominik Prokop
2021-12-01 13:47:47 +01:00
committed by GitHub
parent e170073aff
commit fa930e7dbd
+10 -8
View File
@@ -173,14 +173,16 @@ export class KeybindingSrv {
});
this.bind('mod+s', () => {
appEvents.publish(
new ShowModalReactEvent({
component: SaveDashboardModalProxy,
props: {
dashboard,
},
})
);
if (dashboard.meta.canSave) {
appEvents.publish(
new ShowModalReactEvent({
component: SaveDashboardModalProxy,
props: {
dashboard,
},
})
);
}
});
this.bind('t z', () => {