mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
Merge branch 'next' into develop
This commit is contained in:
commit
b09464234d
@ -29,6 +29,7 @@ import { useIsAssociationField } from '../../../../schema-component/antd/form-it
|
|||||||
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 { SchemaSettingsItemType } from '../../../../application';
|
import { SchemaSettingsItemType } from '../../../../application';
|
||||||
|
import { useColumnSchema } from '../../../../schema-component';
|
||||||
|
|
||||||
const enabledIndexColumn: SchemaSettingsItemType = {
|
const enabledIndexColumn: SchemaSettingsItemType = {
|
||||||
name: 'enableIndexColumn',
|
name: 'enableIndexColumn',
|
||||||
@ -338,11 +339,12 @@ 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();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
collectionName: collectionField?.target,
|
collectionName: collectionField?.target,
|
||||||
Component: LinkageRulesComponent,
|
Component: LinkageRulesComponent,
|
||||||
|
@ -218,7 +218,6 @@ export const SubTable: any = observer(
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
console.log(props);
|
|
||||||
return (
|
return (
|
||||||
<div className={subTableContainer}>
|
<div className={subTableContainer}>
|
||||||
<FlagProvider isInSubTable>
|
<FlagProvider isInSubTable>
|
||||||
|
@ -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