mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:08:32 +00:00
fix: linkage rule only support action with context record (#3355)
This commit is contained in:
parent
7534e12029
commit
79735a372b
@ -84,8 +84,8 @@ export const useFormBlockType = () => {
|
||||
};
|
||||
|
||||
export const useIsDetailBlock = () => {
|
||||
const ctx = useActionContext();
|
||||
return !(ctx?.fieldSchema?.['x-acl-action'] === 'create' || ctx?.fieldSchema?.['x-action'] === 'create');
|
||||
const ctx = useFormBlockContext();
|
||||
return ctx.type === 'update';
|
||||
};
|
||||
|
||||
export const FormBlockProvider = (props) => {
|
||||
|
@ -663,7 +663,6 @@ export const actionSettingsItems: SchemaSettingOptions['items'] = [
|
||||
name: 'linkageRules',
|
||||
Component: SchemaSettingsLinkageRules,
|
||||
useVisible() {
|
||||
const fieldSchema = useFieldSchema();
|
||||
const isAction = useLinkageAction();
|
||||
const { linkageAction } = useSchemaToolbar();
|
||||
return linkageAction || isAction;
|
||||
|
@ -3,7 +3,6 @@ import {
|
||||
ActionDesigner,
|
||||
useSchemaToolbar,
|
||||
SchemaSettingsLinkageRules,
|
||||
useLinkageAction,
|
||||
useCollection,
|
||||
} from '@nocobase/client';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user