mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 11:16:03 +00:00
fix: collection field update reporting error (#3352)
This commit is contained in:
parent
849096aafa
commit
6d68515275
@ -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();
|
||||
|
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user