mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elasticsearch: Fix script fields in query editor (#31681)
* Elasticsearch: Fix script fields in query editor * properly name bucke_script deries
This commit is contained in:
@@ -23,12 +23,16 @@ interface Props {
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export const MetricPicker: FunctionComponent<Props> = ({ options, onChange, className, value }) => (
|
||||
<Segment
|
||||
className={cx(className, noWrap)}
|
||||
options={toOptions(options)}
|
||||
onChange={onChange}
|
||||
placeholder="Select Metric"
|
||||
value={!!value ? toOption(options.find((option) => option.id === value)!) : null}
|
||||
/>
|
||||
);
|
||||
export const MetricPicker: FunctionComponent<Props> = ({ options, onChange, className, value }) => {
|
||||
const selectedOption = options.find((option) => option.id === value);
|
||||
|
||||
return (
|
||||
<Segment
|
||||
className={cx(className, noWrap)}
|
||||
options={toOptions(options)}
|
||||
onChange={onChange}
|
||||
placeholder="Select Metric"
|
||||
value={!!selectedOption ? toOption(selectedOption) : null}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user