> = (props) => {
+ const {
+ data,
+ } = props;
+
+ return (
+
+
+ {typeof data === 'object' && (
+
+ )}
+
+ );
+};
diff --git a/src/admin/components/forms/field-types/Relationship/index.tsx b/src/admin/components/forms/field-types/Relationship/index.tsx
index fc04cb1134..0b73feeeec 100644
--- a/src/admin/components/forms/field-types/Relationship/index.tsx
+++ b/src/admin/components/forms/field-types/Relationship/index.tsx
@@ -23,6 +23,7 @@ import wordBoundariesRegex from '../../../../../utilities/wordBoundariesRegex';
import { AddNewRelation } from './AddNew';
import { findOptionsByValue } from './findOptionsByValue';
import { GetFilterOptions } from './GetFilterOptions';
+import { MultiValueLabel } from './MultiValueLabel';
import './index.scss';
@@ -368,6 +369,9 @@ const Relationship: React.FC = (props) => {
isMulti={hasMany}
isSortable={isSortable}
isLoading={isLoading}
+ components={{
+ MultiValueLabel,
+ }}
onMenuOpen={() => {
if (!hasLoadedFirstPage) {
setIsLoading(true);
diff --git a/src/admin/components/forms/field-types/Relationship/types.ts b/src/admin/components/forms/field-types/Relationship/types.ts
index 24f46113ce..ff4e18b89e 100644
--- a/src/admin/components/forms/field-types/Relationship/types.ts
+++ b/src/admin/components/forms/field-types/Relationship/types.ts
@@ -19,10 +19,12 @@ export type OptionGroup = {
options: Option[]
}
-export type Value = {
+export type ValueAsObject = {
relationTo: string
value: string | number
-} | string | number
+}
+
+export type Value = ValueAsObject | string | number
type CLEAR = {
type: 'CLEAR'