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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,14 +173,16 @@ export class KeybindingSrv {
}); });
this.bind('mod+s', () => { this.bind('mod+s', () => {
appEvents.publish( if (dashboard.meta.canSave) {
new ShowModalReactEvent({ appEvents.publish(
component: SaveDashboardModalProxy, new ShowModalReactEvent({
props: { component: SaveDashboardModalProxy,
dashboard, props: {
}, dashboard,
}) },
); })
);
}
}); });
this.bind('t z', () => { this.bind('t z', () => {