mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 11:25:17 +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,
|
||||
targetModel,
|
||||
})}
|
||||
searchResults={search}
|
||||
searchResults={normalizeRelations(search, {
|
||||
mainFieldName: mainField.name,
|
||||
})}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@ import { getRelationLink } from './getRelationLink';
|
||||
|
||||
export const normalizeRelations = (
|
||||
relations,
|
||||
{ deletions, shouldAddLink, mainFieldName, targetModel }
|
||||
{ deletions = [], shouldAddLink = false, mainFieldName, targetModel }
|
||||
) => {
|
||||
return {
|
||||
data: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user