Added metadata creation (#2086)

* Reworked metadata creation

* Fix from PR

* Removed consolelog
This commit is contained in:
Lucas Bordeau
2023-10-17 20:59:41 +02:00
committed by GitHub
parent c4fa36402b
commit a40516df83
24 changed files with 286 additions and 164 deletions

View File

@ -18,9 +18,7 @@ export const useSetObjectDataTableData = () => {
return useRecoilCallback(
({ set, snapshot }) =>
<T extends { node: { id: string } }>(newEntityArrayRaw: T[]) => {
const newEntityArray = newEntityArrayRaw.map((entity) => entity.node);
<T extends { id: string }>(newEntityArray: T[]) => {
for (const entity of newEntityArray) {
const currentEntity = snapshot
.getLoadable(entityFieldsFamilyState(entity.id))
@ -33,9 +31,6 @@ export const useSetObjectDataTableData = () => {
const entityIds = newEntityArray.map((entity) => entity.id);
// eslint-disable-next-line no-console
console.log({ newEntityArray, entityIds });
set(tableRowIdsState, (currentRowIds) => {
if (JSON.stringify(currentRowIds) !== JSON.stringify(entityIds)) {
return entityIds;