williaster closed pull request #4609: [Explore] overriding Annotations and
Layers' control tab
URL: https://github.com/apache/incubator-superset/pull/4609
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/superset/assets/javascripts/explore/components/ControlPanelsContainer.jsx
b/superset/assets/javascripts/explore/components/ControlPanelsContainer.jsx
index 71e2bc1032..8fe18db77f 100644
--- a/superset/assets/javascripts/explore/components/ControlPanelsContainer.jsx
+++ b/superset/assets/javascripts/explore/components/ControlPanelsContainer.jsx
@@ -92,8 +92,13 @@ class ControlPanelsContainer extends React.Component {
const displaySectionsToRender = [];
allSectionsToRender.forEach((section) => {
if (section.controlSetRows.some(rows => rows.some(
- control => controls[control] && !controls[control].renderTrigger,
- ))) {
+ control => (
+ controls[control] &&
+ (
+ !controls[control].renderTrigger ||
+ controls[control].tabOverride === 'data'
+ )
+ )))) {
querySectionsToRender.push(section);
} else {
displaySectionsToRender.push(section);
diff --git a/superset/assets/javascripts/explore/stores/controls.jsx
b/superset/assets/javascripts/explore/stores/controls.jsx
index ec4522be88..641aaaed9a 100644
--- a/superset/assets/javascripts/explore/stores/controls.jsx
+++ b/superset/assets/javascripts/explore/stores/controls.jsx
@@ -1702,6 +1702,7 @@ export const controls = {
default: [],
description: 'Annotation Layers',
renderTrigger: true,
+ tabOverride: 'data',
},
having_filters: {
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services