mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 10:17:00 +00:00
fix: adding inherited blocks in relation fields under edited operate should only display themselves (#1967)
This commit is contained in:
parent
a69e1acbf4
commit
1aad355950
@ -4,6 +4,7 @@ import { Input } from 'antd';
|
||||
import React from 'react';
|
||||
import { RemoteSelect, RemoteSelectProps } from '../remote-select';
|
||||
import useServiceOptions from './hooks';
|
||||
import { RecordProvider } from '../../../';
|
||||
|
||||
export type AssociationSelectProps<P = any> = RemoteSelectProps<P> & {
|
||||
action?: string;
|
||||
@ -30,14 +31,16 @@ const InternalAssociationSelect = observer((props: AssociationSelectProps) => {
|
||||
></RemoteSelect>
|
||||
|
||||
{isAllowAddNew && (
|
||||
<RecursionField
|
||||
onlyRenderProperties
|
||||
basePath={field.address}
|
||||
schema={fieldSchema}
|
||||
filterProperties={(s) => {
|
||||
return s['x-component'] === 'Action';
|
||||
}}
|
||||
/>
|
||||
<RecordProvider record={null}>
|
||||
<RecursionField
|
||||
onlyRenderProperties
|
||||
basePath={field.address}
|
||||
schema={fieldSchema}
|
||||
filterProperties={(s) => {
|
||||
return s['x-component'] === 'Action';
|
||||
}}
|
||||
/>
|
||||
</RecordProvider>
|
||||
)}
|
||||
</Input.Group>
|
||||
</div>
|
||||
|
@ -19,6 +19,7 @@ import { ActionContext } from '../action';
|
||||
import { useAssociationFieldContext, useFieldNames, useInsertSchema } from './hooks';
|
||||
import schema from './schema';
|
||||
import { flatData, getLabelFormatValue, useLabelUiSchema } from './util';
|
||||
import { RecordProvider } from '../../../';
|
||||
|
||||
const useTableSelectorProps = () => {
|
||||
const field: any = useField();
|
||||
@ -159,14 +160,16 @@ export const InternalPicker = observer((props: any) => {
|
||||
/>
|
||||
</div>
|
||||
{isAllowAddNew && (
|
||||
<RecursionField
|
||||
onlyRenderProperties
|
||||
basePath={field.address}
|
||||
schema={fieldSchema}
|
||||
filterProperties={(s) => {
|
||||
return s['x-component'] === 'Action';
|
||||
}}
|
||||
/>
|
||||
<RecordProvider record={null}>
|
||||
<RecursionField
|
||||
onlyRenderProperties
|
||||
basePath={field.address}
|
||||
schema={fieldSchema}
|
||||
filterProperties={(s) => {
|
||||
return s['x-component'] === 'Action';
|
||||
}}
|
||||
/>
|
||||
</RecordProvider>
|
||||
)}
|
||||
</Input.Group>
|
||||
<ActionContext.Provider value={{ openMode: 'drawer', visible: visibleSelector, setVisible: setVisibleSelector }}>
|
||||
|
Loading…
Reference in New Issue
Block a user