You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2021/02/18 01:54:53 UTC

[superset] branch hugh/dbl-click-title updated: add condition for dropdown

This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch hugh/dbl-click-title
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/hugh/dbl-click-title by this push:
     new d8ac77a  add condition for dropdown
d8ac77a is described below

commit d8ac77a2e21d25ce5d62249eab96c22fec21f96d
Author: hughhhh <hu...@gmail.com>
AuthorDate: Wed Feb 17 17:16:53 2021 -0500

    add condition for dropdown
---
 superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx b/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx
index 987ead9..feeec56 100644
--- a/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx
+++ b/superset-frontend/src/SqlLab/components/TabbedSqlEditors.jsx
@@ -82,6 +82,7 @@ class TabbedSqlEditors extends React.PureComponent {
       queriesArray: [],
       dataPreviewQueries: [],
       hideLeftBar: false,
+      editQuery: false,
     };
     this.removeQueryEditor = this.removeQueryEditor.bind(this);
     this.renameTab = this.renameTab.bind(this);
@@ -375,7 +376,15 @@ class TabbedSqlEditors extends React.PureComponent {
           <div data-test="dropdown-toggle-button">
             <Dropdown overlay={menu} trigger={['click']} />
           </div>
-          <TabTitle onClick={() => console.log('test')}>{qe.title}</TabTitle>
+          <TabTitle
+            onClick={() => {
+              console.log('im clicking the title', qe.title);
+              this.setState({ editQuery: true });
+            }}
+          >
+            {qe.title}
+          </TabTitle>
+          {this.state.editQuery && <input />}
           <TabStatusIcon tabState={state} />{' '}
         </TabTitleWrapper>
       );