mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 12:16:30 +00:00
fix(e2e): should use getPrimaryKey to get primaryKey
This commit is contained in:
parent
f02f8dc845
commit
35b4bfeab6
@ -1,11 +1,11 @@
|
||||
import { connect, mapReadPretty, mapProps, useFieldSchema } from '@formily/react';
|
||||
import { connect, mapProps, mapReadPretty, useFieldSchema } from '@formily/react';
|
||||
import { useCollection, useCollectionManager } from '../../../collection-manager';
|
||||
import { Action } from '../action';
|
||||
import { Editable } from './Editable';
|
||||
import { InternalPicker } from './InternalPicker';
|
||||
import { Nester } from './Nester';
|
||||
import { ReadPretty } from './ReadPretty';
|
||||
import { SubTable } from './SubTable';
|
||||
import { useCollectionManager, useCollection } from '../../../collection-manager';
|
||||
|
||||
export const AssociationField: any = connect(
|
||||
Editable,
|
||||
@ -18,7 +18,7 @@ export const AssociationField: any = connect(
|
||||
const targetCollection = getCollection(collectionField?.target);
|
||||
return {
|
||||
...props,
|
||||
fieldNames: { ...props.fieldNames, value: collectionField?.targetKey || targetCollection.primaryKey },
|
||||
fieldNames: { ...props.fieldNames, value: collectionField?.targetKey || targetCollection.getPrimaryKey() },
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user