fix(snapshot-field): remove depth limit (#1450)

This commit is contained in:
anuoua 2023-02-13 09:55:04 +08:00 committed by GitHub
parent 66246df139
commit 2cfdfd2084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ export const AppendsTreeSelect: React.FC<AppendsTreeSelectProps> = (props) => {
fieldPath: CollectionFieldOptions[] = [],
): TreeOptionType[] => {
const filter = (i: CollectionFieldOptions) =>
!!i.target && !!i.interface && fieldPath.length < 3 && !fieldPath.find((p) => p.target === i.target);
!!i.target && !!i.interface && !fieldPath.find((p) => p.target === i.target);
return fields.filter(filter).map((i) => ({
title: compile(i.uiSchema?.title) ?? i.name,
value: fieldPath