From 513a090cdc852c287c62c5d4dc47d6168974251c Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Fri, 31 Mar 2017 08:27:48 -0700 Subject: [PATCH] [sql lab] address lingering spinner in schema select (#2512) --- .../assets/javascripts/SqlLab/components/SqlEditorLeftBar.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset/assets/javascripts/SqlLab/components/SqlEditorLeftBar.jsx b/superset/assets/javascripts/SqlLab/components/SqlEditorLeftBar.jsx index 333d72dc93541..5ddcf5ccabb40 100644 --- a/superset/assets/javascripts/SqlLab/components/SqlEditorLeftBar.jsx +++ b/superset/assets/javascripts/SqlLab/components/SqlEditorLeftBar.jsx @@ -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: [] });