fix: target collection pointed to by tableoid is incorrect (#2952)
This commit is contained in:
		
							parent
							
								
									a722d0af5a
								
							
						
					
					
						commit
						ac8828196a
					
				@ -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?.field?.collectionName || collection.name);
 | 
			
		||||
  const inheritCollections = useSelfAndChildrenCollections(targetCollection);
 | 
			
		||||
  const { collections = [] } = useCollectionManager();
 | 
			
		||||
  const currentCollections = field?.dataSource
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user