refactor: view collection should omit rawTitle when sync form database (#3327)

This commit is contained in:
katherinehhh 2024-01-05 10:37:25 +08:00 committed by GitHub
parent c26edf6282
commit 393b9f47c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,9 +83,10 @@ const PreviewCom = (props) => {
const fieldsData = Object.values(data?.data?.fields)?.map((v: any) => { const fieldsData = Object.values(data?.data?.fields)?.map((v: any) => {
if (v.source) { if (v.source) {
const option = fields?.data.find((h) => h.name === v.name) || v; const option = fields?.data.find((h) => h.name === v.name) || v;
return { ...v, uiSchema: option.uiSchema }; return { ...v, uiSchema: omit(option.uiSchema, 'rawTitle') };
} else { } else {
return fields?.data.find((h) => h.name === v.name) || v; const option = fields?.data.find((h) => h.name === v.name) || v;
return { ...option, uiSchema: omit(option.uiSchema, 'rawTitle') };
} }
}); });
field.value = fieldsData; field.value = fieldsData;