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 2022/02/18 23:16:46 UTC

[GitHub] [superset] rusackas commented on a change in pull request #18813: fix(altered-modal): displayed the metric value in altered modal correctly

rusackas commented on a change in pull request #18813:
URL: https://github.com/apache/superset/pull/18813#discussion_r810395411



##########
File path: superset-frontend/src/components/AlteredSliceTag/index.jsx
##########
@@ -134,6 +134,10 @@ export default class AlteredSliceTag extends React.Component {
     if (controlsMap[key]?.type === 'CollectionControl') {
       return value.map(v => safeStringify(v)).join(', ');
     }
+    if (controlsMap[key]?.type === 'MetricsControl' && Array.isArray(value)) {
+      const formattedValue = value.map(v => v.label ? v.label : v);

Review comment:
       ```suggestion
         const formattedValue = value.map(v => (v.label ? v.label : v));
   ```
   This is what the linter was complaining about.




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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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