diff --git a/front/src/components/table/Table.tsx b/front/src/components/table/Table.tsx index 62f7ced8c..1fbf0085b 100644 --- a/front/src/components/table/Table.tsx +++ b/front/src/components/table/Table.tsx @@ -124,6 +124,7 @@ const Table = ( getCoreRowModel: getCoreRowModel(), enableRowSelection: true, onRowSelectionChange: setInternalRowSelection, + getRowId: (row) => row.id, }); const selectedRows = table.getSelectedRowModel().rows; diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx index 3822a407d..d6453dc50 100644 --- a/front/src/pages/people/People.tsx +++ b/front/src/pages/people/People.tsx @@ -63,7 +63,7 @@ function People() { } }, [loading, setInternalData, data]); - const addEmptyRow = useCallback(() => { + const addEmptyRow = useCallback(async () => { const newCompany: Person = { id: uuidv4(), firstname: '', @@ -75,7 +75,7 @@ function People() { creationDate: new Date(), city: '', }; - insertPerson(newCompany); + await insertPerson(newCompany); setInternalData([newCompany, ...internalData]); refetch(); }, [internalData, setInternalData, refetch]);