fix: table isFieldComponent

This commit is contained in:
chenos 2021-03-29 11:05:48 +08:00
parent 250dd26df9
commit 716b5e20b4
3 changed files with 3 additions and 2 deletions

View File

@ -108,6 +108,7 @@ export function DrawerSelectComponent(props) {
return ( return (
<> <>
<View <View
isFieldComponent={true}
__parent={__parent} __parent={__parent}
associatedKey={associatedKey} associatedKey={associatedKey}
multiple={multiple} multiple={multiple}

View File

@ -491,7 +491,7 @@ export function Table(props: any) {
if (!detailsOpenMode || !details.length) { if (!detailsOpenMode || !details.length) {
return; return;
} }
if (detailsOpenMode === 'window') { if (!isFieldComponent && detailsOpenMode === 'window') {
const paths = history.location.pathname.split('/'); const paths = history.location.pathname.split('/');
history.push(`/admin/${paths[2]}/${data[rowKey]}/0`); history.push(`/admin/${paths[2]}/${data[rowKey]}/0`);
} else { } else {

View File

@ -69,7 +69,7 @@ export function View(props: any) {
if (wrapper === 'card') { if (wrapper === 'card') {
return ( return (
<Card className={`view-type-${type}`} bordered={false}> <Card className={`view-type-${type}`} bordered={false}>
<Component {...restProps} schema={data} />; <Component {...restProps} schema={data} />
</Card> </Card>
) )
} }