[sql lab] fix table dropdown with large schema make UI unresponsive (#2547)

Indexing was done on render, moving to doing it only when the data
changes.
This commit is contained in:
Maxime Beauchemin
2017-04-04 12:19:44 -07:00
committed by GitHub
parent db6b2f3ae1
commit 6566377740
3 changed files with 11 additions and 7 deletions

View File

@@ -148,7 +148,7 @@ class SqlEditor extends React.PureComponent {
<div className="pull-left">
<Form inline>
<RunQueryActionButton
allowAsync={this.props.database && this.props.database.allow_run_async}
allowAsync={this.props.database ? this.props.database.allow_run_async : false}
dbId={this.props.queryEditor.dbId}
queryState={this.props.latestQuery && this.props.latestQuery.state}
runQuery={this.runQuery.bind(this)}