mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 06:35:20 +00:00
fix: no template data requested during depulicating (#2240)
* fix: depulicate failed * fix: depulicate failed to load template data
This commit is contained in:
parent
5638a2fa2b
commit
11d127e3a4
@ -41,16 +41,16 @@ export const DuplicateAction = observer((props: any) => {
|
||||
const { name } = useCollection();
|
||||
const { getCollectionFields } = useCollectionManager();
|
||||
const { t } = useTranslation();
|
||||
const collectionFields = getCollectionFields(__collection);
|
||||
const collectionFields = getCollectionFields(__collection || name);
|
||||
const template = {
|
||||
key: 'duplicate',
|
||||
dataId: id,
|
||||
default: true,
|
||||
fields:
|
||||
duplicateFields?.filter((v) => {
|
||||
return collectionFields.find((k) => k.name === v);
|
||||
return collectionFields.find((k) => v.includes(k.name));
|
||||
}) || [],
|
||||
collection: __collection,
|
||||
collection: __collection || name,
|
||||
};
|
||||
const isLinkBtn = fieldSchema['x-component'] === 'Action.Link';
|
||||
const handelQuickDuplicate = async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user