From b820113f62ccd41f9f2b1c1b4351bcc698f317df Mon Sep 17 00:00:00 2001 From: reesercollins <10563996+reesercollins@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:47:57 -0400 Subject: [PATCH] fix(chart-table): Scrollbar causing header + footer overflow --- .../src/DataTable/hooks/useSticky.tsx | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx index 6fd4d839ce661..067d071ee1926 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx @@ -237,7 +237,7 @@ function StickyWrap({ const colWidths = columnWidths?.slice(0, columnCount); if (colWidths && bodyHeight) { - const bodyColgroup = ( + const colgroup = ( {colWidths.map((w, i) => ( // eslint-disable-next-line react/no-array-index-key @@ -246,23 +246,6 @@ function StickyWrap({ ); - // header columns do not have vertical scroll bars, - // so we add scroll bar size to the last column - const headerColgroup = - sticky.hasVerticalScroll && scrollBarSize ? ( - - {colWidths.map((x, i) => ( - // eslint-disable-next-line react/no-array-index-key - - ))} - - ) : ( - bodyColgroup - ); - headerTable = (