Skip to content

Commit

Permalink
bug fixed : The result of the previous previewed query remains (ToolJ…
Browse files Browse the repository at this point in the history
…et#4115)

* bug fixed : The result of the previous previewed query remains

* moved the previous added code in setStateFromProps to avoid extra rendering
  • Loading branch information
manishkushare authored Sep 27, 2022
1 parent 3a78cf6 commit 2a3db48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/Editor/QueryManager/QueryManager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class QueryManagerComponent extends React.Component {
isSourceSelected: paneHeightChanged || queryPaneDragged ? this.state.isSourceSelected : props.isSourceSelected,
selectedDataSource:
paneHeightChanged || queryPaneDragged ? this.state.selectedDataSource : props.selectedDataSource,
queryPreviewData: this.state.selectedQuery?.id !== props.selectedQuery?.id ? undefined : props.queryPreviewData,
theme: {
scheme: 'bright',
author: 'chris kempson (http://chriskempson.com)',
Expand Down Expand Up @@ -413,7 +414,6 @@ class QueryManagerComponent extends React.Component {
queryPreviewData,
dataSourceMeta,
} = this.state;

let ElementToRender = '';

if (selectedDataSource) {
Expand Down

0 comments on commit 2a3db48

Please sign in to comment.