From 53c62e922dfe1b64f58bb41dcf14ca59be21fbf4 Mon Sep 17 00:00:00 2001 From: chenos Date: Thu, 18 Mar 2021 22:37:47 +0800 Subject: [PATCH] fix: when the details are empty, the table rows are not clickable --- packages/app/src/components/pages/AdminLoader/View/Table.tsx | 4 ++-- packages/app/src/components/pages/AdminLoader/View/style.less | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app/src/components/pages/AdminLoader/View/Table.tsx b/packages/app/src/components/pages/AdminLoader/View/Table.tsx index 28ce2a072..b4da5cb77 100644 --- a/packages/app/src/components/pages/AdminLoader/View/Table.tsx +++ b/packages/app/src/components/pages/AdminLoader/View/Table.tsx @@ -357,7 +357,7 @@ export function Table(props: any) { components={{ body: { row: ({className, ...others}) => { - if (!detailsOpenMode) { + if (!detailsOpenMode || !details.length) { return } return @@ -384,7 +384,7 @@ export function Table(props: any) { ) { return; } - if (!detailsOpenMode) { + if (!detailsOpenMode || !details.length) { return; } if (detailsOpenMode === 'window') { diff --git a/packages/app/src/components/pages/AdminLoader/View/style.less b/packages/app/src/components/pages/AdminLoader/View/style.less index a00d1f739..f23f4ac0a 100644 --- a/packages/app/src/components/pages/AdminLoader/View/style.less +++ b/packages/app/src/components/pages/AdminLoader/View/style.less @@ -54,7 +54,7 @@ top: 48px; left: 200px; width: calc(100% - 200px); - height: 100%; + height: calc(100% - 48px); overflow: auto; transition: all 0.2s; }