[sql lab] address lingering spinner in schema select (#2512)

This commit is contained in:
Maxime Beauchemin 2017-03-31 08:27:48 -07:00 committed by GitHub
parent abe79d1427
commit 513a090cdc
1 changed files with 2 additions and 1 deletions

View File

@ -32,8 +32,9 @@ class SqlEditorLeftBar extends React.PureComponent {
this.fetchTables(this.props.queryEditor.dbId, this.props.queryEditor.schema);
}
onChange(db) {
const val = (db) ? db.value : null;
const val = db ? db.value : null;
this.setState({ schemaOptions: [] });
this.props.actions.queryEditorSetSchema(this.props.queryEditor, null);
this.props.actions.queryEditorSetDb(this.props.queryEditor, val);
if (!(db)) {
this.setState({ tableOptions: [] });