Refactor MetricFilter component for improved readability in metric name dropdown options

This commit is contained in:
Simon Larsen 2024-11-07 17:45:34 +00:00
parent 0a82d940fd
commit a31ef122a3
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA

View File

@ -40,9 +40,11 @@ const MetricFilter: FunctionComponent<ComponentProps> = (
title: "Metric Name",
type: FieldType.Dropdown,
filterDropdownOptions: DropdownUtil.getDropdownOptionsFromArray(
props.metricNameAndUnits.map((metricNameAndUnits: MetricNameAndUnit) => {
return metricNameAndUnits.metricName;
}), // metricNameAndUnit is an array of MetricNameAndUnit
props.metricNameAndUnits.map(
(metricNameAndUnits: MetricNameAndUnit) => {
return metricNameAndUnits.metricName;
},
), // metricNameAndUnit is an array of MetricNameAndUnit
),
},
{