fix: when the details are empty, the table rows are not clickable

This commit is contained in:
chenos 2021-03-18 22:37:47 +08:00
parent baae04a6dd
commit 53c62e922d
2 changed files with 3 additions and 3 deletions

View File

@ -357,7 +357,7 @@ export function Table(props: any) {
components={{
body: {
row: ({className, ...others}) => {
if (!detailsOpenMode) {
if (!detailsOpenMode || !details.length) {
return <tr className={className} {...others}/>
}
return <tr className={className ? `${className} row-clickable` : 'row-clickable'} {...others}/>
@ -384,7 +384,7 @@ export function Table(props: any) {
) {
return;
}
if (!detailsOpenMode) {
if (!detailsOpenMode || !details.length) {
return;
}
if (detailsOpenMode === 'window') {

View File

@ -54,7 +54,7 @@
top: 48px;
left: 200px;
width: calc(100% - 200px);
height: 100%;
height: calc(100% - 48px);
overflow: auto;
transition: all 0.2s;
}