mirror of https://github.com/apache/superset.git
fix(explore): JS error for creating new metrics from columns (#16477)
This commit is contained in:
parent
ee2eccdb67
commit
a413f796a6
|
@ -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);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue