Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2024-12-31 02:40:23 +00:00
commit 1b49e542cf
2 changed files with 4 additions and 1 deletions

View File

@ -85,6 +85,7 @@ export const SchemaSettingsDefaultValue = function DefaultValueConfigure(props:
const tableCtx = useTableBlockContext(); const tableCtx = useTableBlockContext();
const isAllowContextVariable = const isAllowContextVariable =
collectionField?.interface === 'm2m' || collectionField?.interface === 'm2m' ||
collectionField?.interface === 'mbm' ||
(parentCollectionField?.type === 'hasMany' && collectionField?.interface === 'm2o'); (parentCollectionField?.type === 'hasMany' && collectionField?.interface === 'm2o');
const returnScope = useCallback( const returnScope = useCallback(

View File

@ -101,7 +101,9 @@ export const useContextAssociationFields = ({
const children = const children =
getChildren( getChildren(
getFilterOptions(collectionName).filter((v) => { getFilterOptions(collectionName).filter((v) => {
const isAssociationField = ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany'].includes(v.type); const isAssociationField = ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany', 'belongsToArray'].includes(
v.type,
);
return isAssociationField; return isAssociationField;
}), }),
{ {