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 useUpdateCollectionField = (record) => {
|
||||||
const collectionName = record.collectionName;
|
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 {
|
return {
|
||||||
async run() {
|
async run() {
|
||||||
await run();
|
await run();
|
||||||
|
@ -128,16 +128,16 @@ const OperationButton: any = React.memo((props: any) => {
|
|||||||
delete: {
|
delete: {
|
||||||
type: 'void',
|
type: 'void',
|
||||||
'x-action': 'destroy',
|
'x-action': 'destroy',
|
||||||
'x-component': 'Action',
|
'x-component': 'Action.Link',
|
||||||
'x-visible': '{{isInheritField}}',
|
'x-visible': '{{isInheritField}}',
|
||||||
'x-component-props': {
|
'x-component-props': {
|
||||||
component: DeleteOutlined,
|
component: DeleteOutlined,
|
||||||
icon: 'DeleteOutlined',
|
icon: 'DeleteOutlined',
|
||||||
className: 'btn-del',
|
className: 'btn-del',
|
||||||
confirm: {
|
confirm: {
|
||||||
title: "{{t('Delete record')}}",
|
|
||||||
getContainer: getPopupContainer,
|
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: () =>
|
useAction: () =>
|
||||||
useDestroyFieldActionAndRefreshCM({
|
useDestroyFieldActionAndRefreshCM({
|
||||||
|
Loading…
Reference in New Issue
Block a user