fix: inherited collection failed to select (#2710)

This commit is contained in:
katherinehhh 2023-09-25 10:21:12 +08:00 committed by GitHub
parent 6bc4434d63
commit 52198e57f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ function useOptions({ filter, isTableOid }: CollectionSelectProps) {
const field: any = useField();
const ctx: any = useContext(FilterContext);
const collection = useCollection();
const targetCollection = isTableOid && (ctx?.collectionName || ctx.field?.collectionName || collection.name);
const targetCollection = isTableOid && (ctx?.collectionName || ctx?.field?.collectionName || collection.name);
const inheritCollections = useSelfAndChildrenCollections(targetCollection);
const { collections = [] } = useCollectionManager();
const currentCollections = field?.dataSource