mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 11:46:46 +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 { name } = useCollection();
|
||||||
const { getCollectionFields } = useCollectionManager();
|
const { getCollectionFields } = useCollectionManager();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const collectionFields = getCollectionFields(__collection);
|
const collectionFields = getCollectionFields(__collection || name);
|
||||||
const template = {
|
const template = {
|
||||||
key: 'duplicate',
|
key: 'duplicate',
|
||||||
dataId: id,
|
dataId: id,
|
||||||
default: true,
|
default: true,
|
||||||
fields:
|
fields:
|
||||||
duplicateFields?.filter((v) => {
|
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 isLinkBtn = fieldSchema['x-component'] === 'Action.Link';
|
||||||
const handelQuickDuplicate = async () => {
|
const handelQuickDuplicate = async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user