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 (
<>
<View
isFieldComponent={true}
__parent={__parent}
associatedKey={associatedKey}
multiple={multiple}

View File

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

View File

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