From 2679ee2e46edf53ab07c19e1186ce2877e159303 Mon Sep 17 00:00:00 2001 From: Reese <10563996+reesercollins@users.noreply.github.com> Date: Fri, 16 Dec 2022 00:25:20 -0500 Subject: [PATCH] fix(chart-table): Scrollbar causing header + footer overflow (#21064) --- .../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 6fd4d839c..067d071ee 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 = (