Skip to content

Commit

Permalink
fix #1823
Browse files Browse the repository at this point in the history
  • Loading branch information
frmachao committed Nov 30, 2021
1 parent a658a59 commit 8a65431
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ class TableBody extends React.Component {
) : (
<TableBodyRow options={options}>
<TableBodyCell
isEmpty={true}
colSpan={options.selectableRows !== 'none' || options.expandableRows ? visibleColCnt + 1 : visibleColCnt}
options={options}
colIndex={0}
Expand Down
6 changes: 3 additions & 3 deletions src/components/TableBodyCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const useStyles = makeStyles(
display: 'inline-block',
fontSize: '16px',
height: 'auto',
width: 'calc(50%)',
width: props=>props.isEmpty?'calc(100%)':'calc(50%)',
boxSizing: 'border-box',
'&:last-child': {
borderBottom: 'none',
Expand Down Expand Up @@ -94,7 +94,7 @@ const useStyles = makeStyles(
);

function TableBodyCell(props) {
const classes = useStyles();
const classes = useStyles(props);
const {
children,
colIndex,
Expand Down Expand Up @@ -172,7 +172,7 @@ function TableBodyCell(props) {

var innerCells;
if (
['standard', 'scrollMaxHeight', 'scrollFullHeight', 'scrollFullHeightFullWidth'].indexOf(options.responsive) !== -1
['standard', 'scrollMaxHeight', 'scrollFullHeight', 'scrollFullHeightFullWidth'].indexOf(options.responsive) !== -1||props.isEmpty
) {
innerCells = cells.slice(1, 2);
} else {
Expand Down

0 comments on commit 8a65431

Please sign in to comment.