mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +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 { useIsAssociationField } from '../../../../schema-component/antd/form-item';
|
||||||
import { FormLinkageRules } from '../../../../schema-settings/LinkageRules';
|
import { FormLinkageRules } from '../../../../schema-settings/LinkageRules';
|
||||||
import { SchemaSettingsLinkageRules } from '../../../../schema-settings/SchemaSettings';
|
import { SchemaSettingsLinkageRules } from '../../../../schema-settings/SchemaSettings';
|
||||||
|
import { useColumnSchema } from '../../../../schema-component';
|
||||||
|
|
||||||
const fieldComponent: any = {
|
const fieldComponent: any = {
|
||||||
name: 'fieldComponent',
|
name: 'fieldComponent',
|
||||||
@ -312,7 +313,9 @@ export const linkageRules = {
|
|||||||
Component: SchemaSettingsLinkageRules,
|
Component: SchemaSettingsLinkageRules,
|
||||||
useComponentProps() {
|
useComponentProps() {
|
||||||
const field = useField();
|
const field = useField();
|
||||||
const fieldSchema = useFieldSchema();
|
const schema = useFieldSchema();
|
||||||
|
const { fieldSchema: columnSchema } = useColumnSchema();
|
||||||
|
const fieldSchema = columnSchema || schema;
|
||||||
const cm = useCollectionManager();
|
const cm = useCollectionManager();
|
||||||
const collectionField = cm.getCollectionField(fieldSchema['x-collection-field']);
|
const collectionField = cm.getCollectionField(fieldSchema['x-collection-field']);
|
||||||
const { rerenderDataBlock } = useRerenderDataBlock();
|
const { rerenderDataBlock } = useRerenderDataBlock();
|
||||||
|
@ -104,6 +104,7 @@ function getLinkageRules(fieldSchema) {
|
|||||||
if (!fieldSchema) {
|
if (!fieldSchema) {
|
||||||
return;
|
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