villebro commented on a change in pull request #12782:
URL: https://github.com/apache/superset/pull/12782#discussion_r567215688



##########
File path: superset-frontend/src/explore/components/ControlPanelsContainer.jsx
##########
@@ -92,6 +92,27 @@ class ControlPanelsContainer extends React.Component {
     this.renderControlPanelSection = this.renderControlPanelSection.bind(this);
   }
 
+  componentDidUpdate(prevProps) {
+    const {
+      actions: { setControlValue },
+    } = this.props;
+    if (this.props.form_data.datasource !== prevProps.form_data.datasource) {
+      const defaultValues = [
+        'MetricsControl',
+        'AdhocFilterControl',
+        'TextControl',
+        'SelectControl',
+        'CheckboxControl',
+      ];

Review comment:
       Probably not a big concern, but `AnnotationLayerControl` would probably 
be good to include here.

##########
File path: superset-frontend/src/explore/components/ControlPanelsContainer.jsx
##########
@@ -253,7 +274,7 @@ class ControlPanelsContainer extends React.Component {
     const expandedCustomSections = this.sectionsToExpand(
       displaySectionsToRender,
     );
-
+    console.log('controlPanelContainer props: ', this.props);

Review comment:
       Oops! 🙂 
   ```suggestion
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to