diff --git a/public/app/core/components/Select/SortPicker.tsx b/public/app/core/components/Select/SortPicker.tsx index bc74f517c6e..08153a53b64 100644 --- a/public/app/core/components/Select/SortPicker.tsx +++ b/public/app/core/components/Select/SortPicker.tsx @@ -1,5 +1,6 @@ import React, { FC } from 'react'; -import { AsyncSelect, Icon } from '@grafana/ui'; +import { useAsync } from 'react-use'; +import { Select, Icon } from '@grafana/ui'; import { SelectableValue } from '@grafana/data'; import { DEFAULT_SORT } from 'app/features/search/constants'; import { SearchSrv } from '../../services/search_srv'; @@ -19,15 +20,17 @@ const getSortOptions = () => { }; export const SortPicker: FC = ({ onChange, value, placeholder }) => { - return ( - (getSortOptions, []); + + return !loading ? ( +