fix: collection field update reporting error (#3352)

This commit is contained in:
katherinehhh 2024-01-09 16:51:46 +08:00 committed by GitHub
parent 849096aafa
commit 6d68515275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ import { getPopupContainer } from '../utils';
const useUpdateCollectionField = (record) => {
const collectionName = record.collectionName;
const { run } = useUpdateFieldAction({ collectionName, name: record.name, key: record.key });
const { run } = useUpdateFieldAction({ collectionName, name: record.name, key: record.id });
return {
async run() {
await run();

View File

@ -128,16 +128,16 @@ const OperationButton: any = React.memo((props: any) => {
delete: {
type: 'void',
'x-action': 'destroy',
'x-component': 'Action',
'x-component': 'Action.Link',
'x-visible': '{{isInheritField}}',
'x-component-props': {
component: DeleteOutlined,
icon: 'DeleteOutlined',
className: 'btn-del',
confirm: {
title: "{{t('Delete record')}}",
getContainer: getPopupContainer,
collectionConten: "{{t('Are you sure you want to delete it?')}}",
title: "{{t('Delete record')}}",
content: "{{t('Are you sure you want to delete it?')}}",
},
useAction: () =>
useDestroyFieldActionAndRefreshCM({