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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

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);
},