mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
Merge branch 'next' into develop
This commit is contained in:
commit
c5d7f19a2a
@ -24,12 +24,22 @@ import {
|
||||
useCollectionRecordData,
|
||||
SchemaComponentContext,
|
||||
} from '../../../';
|
||||
import { Action } from '../action';
|
||||
import { isVariable } from '../../../variables/utils/isVariable';
|
||||
import { getInnermostKeyAndValue } from '../../common/utils/uitls';
|
||||
import { RemoteSelect, RemoteSelectProps } from '../remote-select';
|
||||
import useServiceOptions, { useAssociationFieldContext } from './hooks';
|
||||
import { VariablePopupRecordProvider } from '../../../modules/variable/variablesProvider/VariablePopupRecordProvider';
|
||||
|
||||
export const AssociationFieldAddNewer = (props) => {
|
||||
const schemaComponentCtxValue = useContext(SchemaComponentContext);
|
||||
return (
|
||||
<SchemaComponentContext.Provider value={{ ...schemaComponentCtxValue, draggable: true }}>
|
||||
<Action.Container {...props} />
|
||||
</SchemaComponentContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
export type AssociationSelectProps<P = any> = RemoteSelectProps<P> & {
|
||||
addMode?: 'quickAdd' | 'modalAdd';
|
||||
action?: string;
|
||||
@ -141,6 +151,7 @@ const InternalAssociationSelect = observer(
|
||||
</div>
|
||||
);
|
||||
};
|
||||
console.log(fieldSchema);
|
||||
return (
|
||||
<div key={fieldSchema.name}>
|
||||
<Space.Compact style={{ display: 'flex' }}>
|
||||
|
@ -15,6 +15,7 @@ import { InternalPicker } from './InternalPicker';
|
||||
import { Nester } from './Nester';
|
||||
import { ReadPretty } from './ReadPretty';
|
||||
import { SubTable } from './SubTable';
|
||||
import { AssociationFieldAddNewer } from './AssociationSelect';
|
||||
|
||||
export {
|
||||
AssociationFieldMode,
|
||||
@ -26,7 +27,7 @@ export const AssociationField: any = connect(Editable, mapReadPretty(ReadPretty)
|
||||
|
||||
AssociationField.SubTable = SubTable;
|
||||
AssociationField.Nester = Nester;
|
||||
AssociationField.AddNewer = Action.Container;
|
||||
AssociationField.AddNewer = AssociationFieldAddNewer;
|
||||
AssociationField.Selector = Action.Container;
|
||||
AssociationField.Viewer = Action.Container;
|
||||
AssociationField.InternalSelect = InternalPicker;
|
||||
|
Loading…
x
Reference in New Issue
Block a user