diff --git a/packages/app/src/components/actions/Update.tsx b/packages/app/src/components/actions/Update.tsx index 55d4c82a3b..e837fd5220 100644 --- a/packages/app/src/components/actions/Update.tsx +++ b/packages/app/src/components/actions/Update.tsx @@ -3,9 +3,8 @@ import { Button } from 'antd'; import ViewFactory from '@/components/views'; export function Update(props) { - console.log(props); const { title, viewName, resourceName, collection_name } = props.schema; - const { activeTab = {}, item = {} } = props; + const { resourceKey, activeTab = {}, item = {} } = props; const { association } = activeTab; const params = {}; @@ -16,9 +15,8 @@ export function Update(props) { params['associatedKey'] = item.itemId; } else { params['resourceName'] = collection_name; - params['resourceKey'] = item.itemId; + params['resourceKey'] = item.itemId || resourceKey; } - const drawerRef = useRef(); return ( <> @@ -31,7 +29,7 @@ export function Update(props) { /> ) diff --git a/packages/app/src/components/form.fields/drawer-select/index.tsx b/packages/app/src/components/form.fields/drawer-select/index.tsx index f36bf752ff..fc0f8ca014 100644 --- a/packages/app/src/components/form.fields/drawer-select/index.tsx +++ b/packages/app/src/components/form.fields/drawer-select/index.tsx @@ -91,7 +91,7 @@ function DrawerSelectComponent(props) { // console.log('valuevaluevaluevaluevaluevalue', {values, selectedKeys, selectedValue}); }} // associatedKey={} - associatedName={associatedName} + // associatedName={associatedName} viewName={'table'} />