diff --git a/public/app/features/datasources/components/picker/DataSourceDropdown.tsx b/public/app/features/datasources/components/picker/DataSourceDropdown.tsx
index f6b96e79f39..3ea10beef02 100644
--- a/public/app/features/datasources/components/picker/DataSourceDropdown.tsx
+++ b/public/app/features/datasources/components/picker/DataSourceDropdown.tsx
@@ -31,7 +31,7 @@ const INTERACTION_ITEM = {
};
export function DataSourceDropdown(props: DataSourceDropdownProps) {
- const { current, onChange, ...restProps } = props;
+ const { current, onChange, hideTextValue, width, ...restProps } = props;
const [isOpen, setOpen] = useState(false);
const [inputHasFocus, setInputHasFocus] = useState(false);
@@ -107,7 +107,7 @@ export function DataSourceDropdown(props: DataSourceDropdownProps) {
const styles = useStyles2(getStylesDropdown);
return (
-
+
{/* This clickable div is just extending the clickable area on the input element to include the prefix and suffix. */}
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
@@ -122,7 +122,7 @@ export function DataSourceDropdown(props: DataSourceDropdownProps) {
)
}
suffix={}
- placeholder={dataSourceLabel(currentDataSourceInstanceSettings)}
+ placeholder={hideTextValue ? '' : dataSourceLabel(currentDataSourceInstanceSettings)}
onClick={openDropdown}
onFocus={() => {
setInputHasFocus(true);
diff --git a/public/app/features/datasources/components/picker/types.ts b/public/app/features/datasources/components/picker/types.ts
index 0358f227b41..562026ecc84 100644
--- a/public/app/features/datasources/components/picker/types.ts
+++ b/public/app/features/datasources/components/picker/types.ts
@@ -12,6 +12,8 @@ export interface DataSourceDropdownProps {
fileUploadOptions?: DropzoneOptions;
onClickAddCSV?: () => void;
recentlyUsed?: string[];
+ hideTextValue?: boolean;
+ width?: number;
}
export interface PickerContentProps extends DataSourceDropdownProps {