refactor: support third party data souce

This commit is contained in:
katherinehhh 2024-10-16 15:57:04 +08:00
parent f241eebd03
commit ca094a9856

View File

@ -229,7 +229,14 @@ const AddFieldAction = (props) => {
const { availableFieldInterfaces } = getTemplate(record.template) || {};
const { exclude, include } = availableFieldInterfaces || {};
const optionArr = [];
fieldOptions.forEach((v) => {
if (v.children.find((h) => h.allowExternalCreation)) {
optionArr.push({
...v,
children: v.children.filter((h) => h.allowExternalCreation),
});
}
if (v.key === 'relation') {
let children = [];
if (include?.length) {