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 2018/05/24 22:11:57 UTC

[GitHub] mistercrunch commented on a change in pull request #5070: [bugfix] control override vaule by section

mistercrunch commented on a change in pull request #5070: [bugfix] control override vaule by section
URL: https://github.com/apache/incubator-superset/pull/5070#discussion_r190745779
 
 

 ##########
 File path: superset/assets/src/explore/components/ControlPanelsContainer.jsx
 ##########
 @@ -89,17 +89,23 @@ class ControlPanelsContainer extends React.Component {
   }
   render() {
     const allSectionsToRender = this.sectionsToRender();
+    const controlOverrides = visTypes[this.props.controls.viz_type.value].controlOverrides || {};
     const querySectionsToRender = [];
     const displaySectionsToRender = [];
     allSectionsToRender.forEach((section) => {
       if (section.controlSetRows.some(rows => rows.some(
-        control => (
-          controls[control] &&
-          (
-            !controls[control].renderTrigger ||
-            controls[control].tabOverride === 'data'
-          )
-        )))) {
+        (control) => {
+          let controlByOverride = null;
+          if (controls[control] && controlOverrides[control]) {
+            controlByOverride = Object.assign({}, controls[control], controlOverrides[control]);
 
 Review comment:
   We're moving away from `Object.assign`, please use the spread operator

----------------------------------------------------------------
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:
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