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 2021/02/02 17:33:26 UTC

[GitHub] [superset] nikolagigic commented on a change in pull request #12782: feat: reset metrics on dataset change

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



##########
File path: superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover.jsx
##########
@@ -123,6 +123,9 @@ export default class AdhocMetricEditPopover extends React.PureComponent {
         adhocMetricLabel: this.state.adhocMetric?.getDefaultLabel(),
       });
     }
+    if (prevProps.datasource !== this.props.datasource) {

Review comment:
       why are we comparing the whole **datasource** object here instead of comparing the **datasource.name** only like here: https://github.com/apache/superset/pull/12782/files#diff-b6ef883f6b46721ba01ae63a0167874a10de1ce512b3fe4cc3535b9df6d19c2eR73 ?




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



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