diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx index 1b6773662e..c4311ce896 100644 --- a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx +++ b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx @@ -40,6 +40,7 @@ import PersonIcon from '@material-ui/icons/Person'; import GroupIcon from '@material-ui/icons/Group'; import { humanizeEntity, humanizeEntityRef } from '../EntityRefLink/humanize'; import { useFetchEntities } from './useFetchEntities'; +import { withStyles } from '@material-ui/core/styles'; /** @public */ export type CatalogReactEntityOwnerPickerClassKey = 'input'; @@ -53,6 +54,21 @@ const useStyles = makeStyles( }, ); +const FixedWidthFormControlLabel = withStyles( + _theme => ({ + root: { + width: '100%', + }, + label: { + root: { + width: '100%', + }, + width: '100%', + }, + }), + { name: 'FixedWidthFormControlLabel' }, +)(FormControlLabel); + const icon = ; const checkedIcon = ; @@ -154,7 +170,6 @@ export const EntityOwnerPicker = (props?: EntityOwnerPickerProps) => { if (typeof e !== 'string') { cache.setEntity(e); } - return entityRef; }), ); @@ -167,37 +182,40 @@ export const EntityOwnerPicker = (props?: EntityOwnerPickerProps) => { humanizeEntityRef(entity, { defaultKind: entity.kind }), ); return ( - - } - onClick={event => event.preventDefault()} - label={ - - - {isGroup ? ( - - ) : ( - - )} -   - - {humanizedName} + + + } + onClick={event => event.preventDefault()} + label={ + + + {isGroup ? ( + + ) : ( + + )} +   + + {humanizedName} + - - - } - /> + + } + /> + ); }} size="small"