From 9789e3fb9b658e1f38080915132ae43c541e68e9 Mon Sep 17 00:00:00 2001 From: vera-liu Date: Wed, 9 Nov 2016 14:21:06 -0800 Subject: [PATCH] Bind data preview tabs to sql editor (#1573) --- .../assets/javascripts/SqlLab/components/TabbedSqlEditors.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caravel/assets/javascripts/SqlLab/components/TabbedSqlEditors.jsx b/caravel/assets/javascripts/SqlLab/components/TabbedSqlEditors.jsx index 0dfc005424a3e..cc2f35a49d538 100644 --- a/caravel/assets/javascripts/SqlLab/components/TabbedSqlEditors.jsx +++ b/caravel/assets/javascripts/SqlLab/components/TabbedSqlEditors.jsx @@ -126,7 +126,7 @@ class TabbedSqlEditors extends React.PureComponent { const dataPreviewQueries = []; this.props.tables.forEach((table) => { const queryId = table.dataPreviewQueryId; - if (queryId && this.props.queries[queryId]) { + if (queryId && this.props.queries[queryId] && table.queryEditorId === qe.id) { dataPreviewQueries.push(this.props.queries[queryId]); } });