Use search instead of findMany in relation pickers (#7798)
First step of #https://github.com/twentyhq/twenty/issues/3298. Here we update the search endpoint to allow for a filter argument, which we currently use in the relation pickers to restrict or exclude ids from search. In a future PR we will try to simplify the search logic in the FE
This commit is contained in:
@ -80,13 +80,11 @@ describe('useFilteredSearchEntityQuery', () => {
|
||||
setMetadataItems(generatedMockObjectMetadataItems);
|
||||
|
||||
return useFilteredSearchEntityQuery({
|
||||
orderByField: 'name',
|
||||
filters: [{ fieldNames: ['name'], filter: 'Entity' }],
|
||||
sortOrder: 'AscNullsLast',
|
||||
selectedIds: ['1'],
|
||||
limit: 10,
|
||||
excludeRecordIds: ['2'],
|
||||
objectNameSingular: 'person',
|
||||
searchFilter: 'Entity',
|
||||
});
|
||||
},
|
||||
{ wrapper: Wrapper },
|
||||
|
||||
Reference in New Issue
Block a user