fix(explore): metric label disappearing in some scenarios (#16190)

(cherry picked from commit 98fc29cbbb)
This commit is contained in:
Kamil Gabryjelski
2021-08-11 14:05:44 +02:00
committed by Ville Brofeldt
parent bc5e05b1df
commit 4c6a2597b4

View File

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