fix(explore): JS error for creating new metrics from columns (#16477)

This commit is contained in:
Jesse Yang
2021-08-26 17:04:45 -07:00
committed by GitHub
parent ee2eccdb67
commit a413f796a6

View File

@@ -186,9 +186,7 @@ export const DndMetricSelect = (props: any) => {
const onNewMetric = useCallback(
(newMetric: Metric) => {
const newValue = props.multi
? [...value, newMetric.metric_name]
: [newMetric.metric_name];
const newValue = props.multi ? [...value, newMetric] : [newMetric];
setValue(newValue);
handleChange(newValue);
},