mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-04 21:19:27 +08:00
fix: ssue with configuring linkage rules in subform (popup) within subtable (#6803)
This commit is contained in:
parent
db88e8301f
commit
fe005e091a
@ -28,6 +28,7 @@ import { isSubMode } from '../../../../schema-component/antd/association-field/u
|
||||
import { useIsAssociationField } from '../../../../schema-component/antd/form-item';
|
||||
import { FormLinkageRules } from '../../../../schema-settings/LinkageRules';
|
||||
import { SchemaSettingsLinkageRules } from '../../../../schema-settings/SchemaSettings';
|
||||
import { useColumnSchema } from '../../../../schema-component';
|
||||
|
||||
const fieldComponent: any = {
|
||||
name: 'fieldComponent',
|
||||
@ -312,7 +313,9 @@ export const linkageRules = {
|
||||
Component: SchemaSettingsLinkageRules,
|
||||
useComponentProps() {
|
||||
const field = useField();
|
||||
const fieldSchema = useFieldSchema();
|
||||
const schema = useFieldSchema();
|
||||
const { fieldSchema: columnSchema } = useColumnSchema();
|
||||
const fieldSchema = columnSchema || schema;
|
||||
const cm = useCollectionManager();
|
||||
const collectionField = cm.getCollectionField(fieldSchema['x-collection-field']);
|
||||
const { rerenderDataBlock } = useRerenderDataBlock();
|
||||
|
@ -104,6 +104,7 @@ function getLinkageRules(fieldSchema) {
|
||||
if (!fieldSchema) {
|
||||
return;
|
||||
}
|
||||
const result = fieldSchema['x-linkage-rules'] || fieldSchema?.parent?.['x-linkage-rules'] || [];
|
||||
|
||||
return fieldSchema['x-linkage-rules']?.filter((k) => !k.disabled);
|
||||
return result?.filter((k) => !k.disabled);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user