Optimize table loading (#866)
* wip * wip * Ok * Deleted unused code * Fixed lint * Minor fixes * Minor fixes * Minor Fixes * Minor merge fixes * Ok * Fix storybook tests * Removed console.log * Fix login * asd * Fixed storybook * Added await * Fixed await * Added sleep for failing test * Fix sleep * Fix test * Fix tests --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -27,17 +27,22 @@ export function PeopleCompanyEditableFieldEditMode({ people }: OwnProps) {
|
||||
selectedIds: people.company?.id ? [people.company.id] : [],
|
||||
});
|
||||
|
||||
async function handleEntitySelected(entity: EntityForSelect) {
|
||||
await updatePerson({
|
||||
variables: {
|
||||
where: {
|
||||
id: people.id,
|
||||
async function handleEntitySelected(
|
||||
entity: EntityForSelect | null | undefined,
|
||||
) {
|
||||
if (entity) {
|
||||
await updatePerson({
|
||||
variables: {
|
||||
where: {
|
||||
id: people.id,
|
||||
},
|
||||
data: {
|
||||
company: { connect: { id: entity.id } },
|
||||
},
|
||||
},
|
||||
data: {
|
||||
company: { connect: { id: entity.id } },
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
closeEditableField();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user