migrate: formly live formly forms

This commit is contained in:
Johannes Millan 2024-06-17 19:44:30 +02:00
parent fcc6865340
commit 83d62ce8da

View file

@ -30,20 +30,19 @@ export const adjustToLiveFormlyForm = (
};
}
// TODO check if not working
// if (
// item.type === 'repeat' &&
// item?.fieldArray?.fieldGroup &&
// isArray(item.fieldArray.fieldGroup)
// ) {
// return {
// ...item,
// fieldArray: {
// ...item.fieldArray,
// fieldGroup: adjustToLiveFormlyForm(item?.fieldArray?.fieldGroup),
// },
// };
// }
if (
item.type === 'repeat' &&
(item?.fieldArray as any)?.fieldGroup &&
isArray((item.fieldArray as any).fieldGroup)
) {
return {
...item,
fieldArray: {
...item.fieldArray,
fieldGroup: adjustToLiveFormlyForm((item?.fieldArray as any)?.fieldGroup),
},
};
}
return item;
});
};