mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
feat(m2m-array): supports using "Table selected records" variable in m2m array fields (#5974)
This commit is contained in:
parent
e47f0ff342
commit
f229f9f0f9
@ -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(
|
||||||
|
@ -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;
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user