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

(cherry picked from commit a693b2eaef)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2021-06-17 11:46:58 +02:00
committed by GitHub
co-authored by Tobias Skarhed
parent f9c70dc834
commit d246127b2b
@@ -198,7 +198,7 @@ export const Table: FC<Props> = memo((props: Props) => {
return (
<div {...getTableProps()} className={tableStyles.table} aria-label={ariaLabel}>
<CustomScrollbar hideVerticalTrack={true}>
<div style={{ width: `${totalColumnsWidth}px` }}>
<div style={{ width: totalColumnsWidth ? `${totalColumnsWidth}px` : '100%' }}>
{!noHeader && (
<div>
{headerGroups.map((headerGroup: HeaderGroup) => {