Table: Set width 100% if the calced width is 0 (#35802)

This commit is contained in:
Tobias Skarhed
2021-06-16 16:17:33 +02:00
committed by GitHub
parent cfae7d8b97
commit a693b2eaef

View File

@@ -198,7 +198,7 @@ export const Table: FC<Props> = memo((props: Props) => {
return ( return (
<div {...getTableProps()} className={tableStyles.table} aria-label={ariaLabel}> <div {...getTableProps()} className={tableStyles.table} aria-label={ariaLabel}>
<CustomScrollbar hideVerticalTrack={true}> <CustomScrollbar hideVerticalTrack={true}>
<div style={{ width: `${totalColumnsWidth}px` }}> <div style={{ width: totalColumnsWidth ? `${totalColumnsWidth}px` : '100%' }}>
{!noHeader && ( {!noHeader && (
<div> <div>
{headerGroups.map((headerGroup: HeaderGroup) => { {headerGroups.map((headerGroup: HeaderGroup) => {