You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by kr...@apache.org on 2020/04/09 01:27:11 UTC

[incubator-superset] branch master updated: fix: add explore control tabOverride at the section level (#9495)

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

kristw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 5565895  fix: add explore control tabOverride at the section level (#9495)
5565895 is described below

commit 5565895819dff7a126429ae7a696d194aa97c9db
Author: Jianchao Yang <je...@airbnb.com>
AuthorDate: Wed Apr 8 18:26:53 2020 -0700

    fix: add explore control tabOverride at the section level (#9495)
---
 superset-frontend/src/explore/components/ControlPanelsContainer.jsx | 3 +++
 superset-frontend/src/explore/controlPanels/BigNumber.jsx           | 1 +
 2 files changed, 4 insertions(+)

diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.jsx b/superset-frontend/src/explore/components/ControlPanelsContainer.jsx
index ccfbaac..9edae96 100644
--- a/superset-frontend/src/explore/components/ControlPanelsContainer.jsx
+++ b/superset-frontend/src/explore/components/ControlPanelsContainer.jsx
@@ -198,7 +198,10 @@ class ControlPanelsContainer extends React.Component {
     const querySectionsToRender = [];
     const displaySectionsToRender = [];
     allSectionsToRender.forEach(section => {
+      // if at least one control in the secion is not `renderTrigger`
+      // or asks to be displayed at the Data tab
       if (
+        section.tabOverride === 'data' ||
         section.controlSetRows.some(rows =>
           rows.some(
             control =>
diff --git a/superset-frontend/src/explore/controlPanels/BigNumber.jsx b/superset-frontend/src/explore/controlPanels/BigNumber.jsx
index a42ae4e..f303096 100644
--- a/superset-frontend/src/explore/controlPanels/BigNumber.jsx
+++ b/superset-frontend/src/explore/controlPanels/BigNumber.jsx
@@ -29,6 +29,7 @@ export default {
     },
     {
       label: t('Options'),
+      tabOverride: 'data',
       expanded: true,
       controlSetRows: [
         [