Feat/single entity select relation picker (#345)
* - Implemented recoil scoped state - Implemented SingleEntitySelect - Implemented keyboard shortcut up/down select * Added useRecoilScopedValue * Fix storybook * Fix storybook * Fix storybook * Fix storybook --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -45,7 +45,9 @@ export const graphqlMocks = [
|
||||
>(
|
||||
mockedCompaniesData,
|
||||
req.variables.where,
|
||||
req.variables.orderBy,
|
||||
Array.isArray(req.variables.orderBy)
|
||||
? req.variables.orderBy
|
||||
: [req.variables.orderBy],
|
||||
req.variables.limit,
|
||||
);
|
||||
return res(
|
||||
|
||||
@ -86,7 +86,7 @@ export function filterAndSortData<DataT>(
|
||||
filteredData = filterData<DataT>(data, where);
|
||||
}
|
||||
|
||||
if (orderBy) {
|
||||
if (orderBy && Array.isArray(orderBy) && orderBy.length > 0 && orderBy[0]) {
|
||||
const firstOrderBy = orderBy[0];
|
||||
|
||||
const key = Object.keys(firstOrderBy)[0];
|
||||
|
||||
@ -23,7 +23,7 @@ export const mockedPeopleData: Array<MockedPerson> = [
|
||||
lastname: 'Prot',
|
||||
email: 'alexandre@qonto.com',
|
||||
company: {
|
||||
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6c',
|
||||
id: '5c21e19e-e049-4393-8c09-3e3f8fb09ecb',
|
||||
name: 'Qonto',
|
||||
domainName: 'qonto.com',
|
||||
__typename: 'Company',
|
||||
|
||||
Reference in New Issue
Block a user