Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions app/components/Settings/Preview/Preview.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,30 +389,34 @@ class Preview extends Component {
// If Chart Editor selected and Schemas Tree visible,
// then save size in lastSize before hiding
this.props.updatePreview({
// uncomment to hide sql editor
// showEditor: false,
showChart: true,
showEditor: false,
lastSize: size,
size: minSize
});
} else {
this.props.updatePreview({
showChart: true,
showEditor: false
// uncomment to hide sql editor
// showEditor: false,
showChart: true
});
}
} else {
if (!schemasVisible) {
// If Chart Editor not selected and Schemas Tree was hidden,
// then restore the last size
this.props.updatePreview({
// uncomment to show sql editor
// showEditor: true,
showChart: false,
showEditor: true,
size: lastSize
});
} else {
this.props.updatePreview({
showChart: false,
showEditor: true
// uncomment to show sql editor
// showEditor: true,
showChart: false
});
}
}
Expand Down
1 change: 1 addition & 0 deletions app/components/Settings/Preview/code-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
font-size: 14px;
height: 140px;
margin-bottom: 20px;
width: 740px;
}

.CodeMirror-gutters {
Expand Down
11 changes: 9 additions & 2 deletions app/components/Settings/Settings.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ class Settings extends Component {
selectedTab={selectedTab}
newTab={newTab}
setTab={tabId => {
setTab(tabId);
updatePreview({
showChart: false,
showEditor: true,
size: 200
});
setTab(tabId);
}}
deleteTab={deleteTab}
/>
Expand All @@ -304,7 +304,14 @@ class Settings extends Component {

<Tabs
selectedIndex={this.state.selectedPanel[selectedTab] || 0}
onSelect={panelIndex => this.setState({selectedPanel: {[selectedTab]: panelIndex}})}
onSelect={(panelIndex) => {
updatePreview({
showChart: false,
showEditor: true,
size: 200
});
this.setState({selectedPanel: {[selectedTab]: panelIndex}});
}}
>

<TabList>
Expand Down