You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/03/23 06:05:03 UTC

[GitHub] [incubator-superset] ktmud commented on a change in pull request #9341: feat: add timeRangeFixed and timeRangeUseFallback for Big Number chart

ktmud commented on a change in pull request #9341: feat: add timeRangeFixed and timeRangeUseFallback for Big Number chart
URL: https://github.com/apache/incubator-superset/pull/9341#discussion_r395970369
 
 

 ##########
 File path: superset-frontend/src/explore/components/ControlPanelsContainer.jsx
 ##########
 @@ -97,6 +97,12 @@ class ControlPanelsContainer extends React.Component {
 
   renderControl(name, config, lookupControlData) {
     const { actions, controls, exploreState, form_data: formData } = this.props;
+    const { visibility } = config;
+
+    // if visibility check says the config is not visible, don't render it
+    if (visibility && !visibility.call(config, this.props)) {
+      return null;
+    }
 
 Review comment:
   I'm adding a `visibility` API for control configs to conditionally hide certain controls. This makes sense for options that interact with each other.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org