kgabryje commented on a change in pull request #12619:
URL: https://github.com/apache/superset/pull/12619#discussion_r561709289



##########
File path: 
superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover.jsx
##########
@@ -125,7 +125,15 @@ export default class AdhocMetricEditPopover extends 
React.Component {
       label = metricLabel;
     }
 
-    const metric = savedMetric?.metric_name ? savedMetric : adhocMetric;
+    // if saved metric, generate a unique savedMetricId
+    const metric = savedMetric?.metric_name
+      ? {
+          ...savedMetric,
+          savedMetricId: `${Math.random()

Review comment:
       I did not want to add another dependency to the project and that method 
of generating ID was already in use in `AdhocMetric.js`




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to