From 4dbd113e2045d606191368ed79b549d9e20d4155 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 2 Jan 2019 12:21:30 +0100 Subject: [PATCH] use correct type for select option --- .../app/core/components/Select/MetricSelect.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/public/app/core/components/Select/MetricSelect.tsx b/public/app/core/components/Select/MetricSelect.tsx index 0fb1194260c..9cd1c3e03c9 100644 --- a/public/app/core/components/Select/MetricSelect.tsx +++ b/public/app/core/components/Select/MetricSelect.tsx @@ -3,10 +3,11 @@ import _ from 'lodash'; import Select from './Select'; import { Variable } from 'app/types/templates'; +import { SelectOptionItem } from './Select'; export interface Props { onChange: (value: string) => void; - options: any[]; + options: SelectOptionItem[]; isSearchable: boolean; value: string; placeholder?: string; @@ -46,17 +47,7 @@ export class MetricSelect extends React.Component { } buildOptions({ variables = [], options }) { - return variables.length > 0 - ? [ - this.getVariablesGroup(), - // { - // label: groupName, - // expanded: true, - // options, - // }, - ...options, - ] - : options; + return variables.length > 0 ? [this.getVariablesGroup(), ...options] : options; } getVariablesGroup() {