mirror of
https://github.com/strapi/strapi.git
synced 2025-11-11 07:39:16 +00:00
RelationInputWrapper: Apply normalization to search results aswell
This commit is contained in:
parent
afc3b5252f
commit
77026fe24b
@ -102,7 +102,9 @@ export const RelationInputWrapper = ({
|
|||||||
shouldAddLink: shouldDisplayRelationLink,
|
shouldAddLink: shouldDisplayRelationLink,
|
||||||
targetModel,
|
targetModel,
|
||||||
})}
|
})}
|
||||||
searchResults={search}
|
searchResults={normalizeRelations(search, {
|
||||||
|
mainFieldName: mainField.name,
|
||||||
|
})}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { getRelationLink } from './getRelationLink';
|
|||||||
|
|
||||||
export const normalizeRelations = (
|
export const normalizeRelations = (
|
||||||
relations,
|
relations,
|
||||||
{ deletions, shouldAddLink, mainFieldName, targetModel }
|
{ deletions = [], shouldAddLink = false, mainFieldName, targetModel }
|
||||||
) => {
|
) => {
|
||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user