KeybindingSrv: Prevent dashboard save modal when dashboard cannot be saved (#42505)
This commit is contained in:
1 parent
e170073aff
commit
fa930e7dbd
1 file changed
+10
-8
@@ -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', () => {
|
||||
|
||||
Reference in new issue
Block a user