You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by kg...@apache.org on 2021/08/11 12:06:59 UTC

[superset] branch master updated: fix(explore): metric label disappearing in some scenarios (#16190)

This is an automated email from the ASF dual-hosted git repository.

kgabryje pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 98fc29c  fix(explore): metric label disappearing in some scenarios (#16190)
98fc29c is described below

commit 98fc29cbbbdc1d94a61d9f1a12984e409568cc43
Author: Kamil Gabryjelski <ka...@gmail.com>
AuthorDate: Wed Aug 11 14:05:44 2021 +0200

    fix(explore): metric label disappearing in some scenarios (#16190)
---
 .../components/controls/DndColumnSelectControl/DndMetricSelect.tsx     | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
index 6fc8714..f44934a 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
@@ -185,6 +185,9 @@ export const DndMetricSelect = (props: any) => {
 
   const onMetricEdit = useCallback(
     (changedMetric: Metric | AdhocMetric, oldMetric: Metric | AdhocMetric) => {
+      if (oldMetric instanceof AdhocMetric && oldMetric.equals(changedMetric)) {
+        return;
+      }
       const newValue = value.map(value => {
         if (
           // compare saved metrics