fix(explore): don't allow selecting duplicated saved metric (#12657)

This commit is contained in:
Kamil Gabryjelski
2021-01-22 00:51:59 +01:00
committed by GitHub
parent a90ebd94d4
commit 6280b34483
5 changed files with 34 additions and 15 deletions

View File

@@ -35,6 +35,7 @@ const propTypes = {
onDropLabel: PropTypes.func,
columns: PropTypes.arrayOf(columnType),
savedMetrics: PropTypes.arrayOf(savedMetricType),
savedMetricsOptions: PropTypes.arrayOf(savedMetricType),
multi: PropTypes.bool,
datasourceType: PropTypes.string,
};
@@ -45,6 +46,7 @@ export default function MetricDefinitionValue({
onRemoveMetric,
columns,
savedMetrics,
savedMetricsOptions,
datasourceType,
onMoveLabel,
onDropLabel,
@@ -68,7 +70,7 @@ export default function MetricDefinitionValue({
onMetricEdit,
onRemoveMetric,
columns,
savedMetrics,
savedMetricsOptions,
datasourceType,
adhocMetric,
onMoveLabel,