mirror of
https://github.com/apache/superset.git
synced 2026-04-26 11:34:27 +00:00
Added check if SQL query is empty and disable shortcut for run query (#11877)
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user