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]); } });