diff --git a/superset/assets/javascripts/SqlLab/components/RunQueryActionButton.jsx b/superset/assets/javascripts/SqlLab/components/RunQueryActionButton.jsx index d117318460..9d0865c136 100644 --- a/superset/assets/javascripts/SqlLab/components/RunQueryActionButton.jsx +++ b/superset/assets/javascripts/SqlLab/components/RunQueryActionButton.jsx @@ -3,12 +3,15 @@ import Button from '../../components/Button'; const propTypes = { allowAsync: PropTypes.bool.isRequired, - dbId: PropTypes.number.isRequired, + dbId: PropTypes.number, queryState: PropTypes.string.isRequired, runQuery: PropTypes.func.isRequired, selectedText: PropTypes.string, stopQuery: PropTypes.func.isRequired, }; +const defaultProps = { + allowAsync: false, +}; export default function RunQueryActionButton(props) { const runBtnText = props.selectedText ? 'Run Selected Query' : 'Run Query'; @@ -69,3 +72,4 @@ export default function RunQueryActionButton(props) { } RunQueryActionButton.propTypes = propTypes; +RunQueryActionButton.defaultProps = defaultProps; diff --git a/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx b/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx index 6765d90121..86ca358a9d 100644 --- a/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx +++ b/superset/assets/javascripts/SqlLab/components/SqlEditor.jsx @@ -148,7 +148,7 @@ class SqlEditor extends React.PureComponent {