diff --git a/public/app/core/components/Picker/PickerOption.tsx b/public/app/core/components/Picker/PickerOption.tsx index 98bb5dc566e..0ace067efc6 100644 --- a/public/app/core/components/Picker/PickerOption.tsx +++ b/public/app/core/components/Picker/PickerOption.tsx @@ -4,19 +4,40 @@ import { OptionProps } from 'react-select/lib/components/Option'; // https://github.com/JedWatson/react-select/issues/3038 interface ExtendedOptionProps extends OptionProps { - data: any; + data: { + description?: string; + imgUrl?: string; + }; } -export const PickerOption = (props: ExtendedOptionProps) => { - const { children, data, className } = props; +export const Option = (props: ExtendedOptionProps) => { + const { children, isSelected, data } = props; + return ( -
- {data.avatarUrl && {data.label}} - {children} +
+ {data.imgUrl && } +
+
{children}
+ {data.description &&
{data.description}
} +
+ {isSelected &&