Added check if SQL query is empty and disable shortcut for run query (#11877)

This commit is contained in:
Kasia Kucharczyk 2020-12-04 19:45:43 +01:00 committed by GitHub
parent 60122a2b2d
commit 98dc65722c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -199,13 +199,21 @@ class SqlEditor extends React.PureComponent {
name: 'runQuery1',
key: 'ctrl+r',
descr: t('Run query'),
func: this.runQuery,
func: () => {
if (this.state.sql.trim() !== '') {
this.runQuery();
}
},
},
{
name: 'runQuery2',
key: 'ctrl+enter',
descr: t('Run query'),
func: this.runQuery,
func: () => {
if (this.state.sql.trim() !== '') {
this.runQuery();
}
},
},
{
name: 'newTab',