diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx
index 685279b83e..6a4a6d2dd0 100644
--- a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx
+++ b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx
@@ -41,6 +41,7 @@ import GroupIcon from '@material-ui/icons/Group';
import { humanizeEntity, humanizeEntityRef } from '../EntityRefLink/humanize';
import { useFetchEntities } from './useFetchEntities';
import { withStyles } from '@material-ui/core/styles';
+import { useEntityPresentation } from '../../apis';
/** @public */
export type CatalogReactEntityOwnerPickerClassKey = 'input';
@@ -79,6 +80,42 @@ export type EntityOwnerPickerProps = {
mode?: 'owners-only' | 'all';
};
+function WrappedOption(props: { entity: Entity; isSelected: boolean }) {
+ const classes = useStyles();
+ const isGroup = props.entity.kind.toLocaleLowerCase('en-US') === 'group';
+ const { primaryTitle } = useEntityPresentation(props.entity);
+ return (
+
+
+ }
+ onClick={event => event.preventDefault()}
+ label={
+
+
+ {isGroup ? (
+
+ ) : (
+
+ )}
+
+
+ {primaryTitle}
+
+
+
+ }
+ />
+
+ );
+}
+
/** @public */
export const EntityOwnerPicker = (props?: EntityOwnerPickerProps) => {
const classes = useStyles();
@@ -176,41 +213,7 @@ export const EntityOwnerPicker = (props?: EntityOwnerPickerProps) => {
}}
filterOptions={x => x}
renderOption={(entity, { selected }) => {
- const isGroup = entity.kind.toLocaleLowerCase('en-US') === 'group';
- const humanizedName = humanizeEntity(
- entity,
- humanizeEntityRef(entity, { defaultKind: entity.kind }),
- );
- return (
-
-
- }
- onClick={event => event.preventDefault()}
- label={
-
-
- {isGroup ? (
-
- ) : (
-
- )}
-
-
- {humanizedName}
-
-
-
- }
- />
-
- );
+ return ;
}}
size="small"
popupIcon={}