mirror of
https://github.com/apache/superset.git
synced 2024-09-16 02:29:39 -04:00
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(
|
const onNewMetric = useCallback(
|
||||||
(newMetric: Metric) => {
|
(newMetric: Metric) => {
|
||||||
const newValue = props.multi
|
const newValue = props.multi ? [...value, newMetric] : [newMetric];
|
||||||
? [...value, newMetric.metric_name]
|
|
||||||
: [newMetric.metric_name];
|
|
||||||
setValue(newValue);
|
setValue(newValue);
|
||||||
handleChange(newValue);
|
handleChange(newValue);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user