Skip to content

Commit

Permalink
Merge pull request #1825 from frmachao/fix_by_machao
Browse files Browse the repository at this point in the history
fix two issues
  • Loading branch information
wdh2100 committed Feb 20, 2022
2 parents b50437d + 8a65431 commit b8a6059
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 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
2 changes: 1 addition & 1 deletion src/components/TableHeadCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const TableHeadCell = ({
classes: { root: classes.sortLabelRoot },
tabIndex: -1,
active: sortActive,
hideSortIcon: true,
hideSortIcon: false,
...(ariaSortDirection ? { direction: sortDirection } : {}),
};

Expand Down

0 comments on commit b8a6059

Please sign in to comment.