From 5565895819dff7a126429ae7a696d194aa97c9db Mon Sep 17 00:00:00 2001 From: Jianchao Yang Date: Wed, 8 Apr 2020 18:26:53 -0700 Subject: [PATCH] fix: add explore control tabOverride at the section level (#9495) --- .../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 ccfbaacbda6a6..9edae96ad724c 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 a42ae4efda7e2..f3030968552f9 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: [ [