fix: toggle query editor icon showing up on navbar when query editor is hidden (#1595)

This commit is contained in:
Gandharv 2021-12-16 13:09:51 +05:30 committed by GitHub
parent df5df1a352
commit 032fbef60b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -654,7 +654,6 @@ class Editor extends React.Component {
showQueryEditor: !prev.showQueryEditor,
queryPaneHeight: this.state.queryPaneHeight === 100 ? 30 : 100,
}));
this.toolTipRefShow.current.style.display = this.state.showQueryEditor ? 'flex' : 'none';
};
toggleComments = () => {
@ -698,7 +697,6 @@ class Editor extends React.Component {
});
};
toolTipRefShow = createRef();
queryPaneRef = createRef();
getCanvasWidth = () => {
@ -811,23 +809,6 @@ class Editor extends React.Component {
{this.state.editingVersion && (
<small className="app-version-name">{`App version: ${this.state.editingVersion.name}`}</small>
)}
<div className="editor-buttons">
<span
className={`btn btn-light mx-2`}
onClick={this.toggleQueryEditor}
data-tip="Show query editor"
data-class="py-1 px-2"
ref={this.toolTipRefShow}
style={{ display: 'none', opacity: 0.5 }}
>
<img
style={{ transform: 'rotate(-90deg)' }}
src="/assets/images/icons/editor/sidebar-toggle.svg"
width="12"
height="12"
/>
</span>
</div>
<div className="layout-buttons cursor-pointer">
{this.renderLayoutIcon(currentLayout === 'desktop')}
</div>