From e6d2fb6fdfa4d741de16b322bdc4bd01fb559413 Mon Sep 17 00:00:00 2001 From: Kamil Gabryjelski Date: Thu, 1 Feb 2024 18:27:22 +0100 Subject: [PATCH] fix(plugin-chart-table): Prevent misalignment of totals and headers when scrollbar is visible (#26964) --- .../plugin-chart-table/src/DataTable/hooks/useSticky.tsx | 4 ++++ 1 file changed, 4 insertions(+) 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 2c82ca858..dd753012d 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 @@ -226,6 +226,7 @@ function StickyWrap({ height: maxHeight, overflow: 'auto', visibility: 'hidden', + scrollbarGutter: 'stable', }} > {React.cloneElement(table, {}, theadWithRef, tbody, tfootWithRef)} @@ -252,6 +253,7 @@ function StickyWrap({ ref={scrollHeaderRef} style={{ overflow: 'hidden', + scrollbarGutter: 'stable', }} > {React.cloneElement( @@ -270,6 +272,7 @@ function StickyWrap({ ref={scrollFooterRef} style={{ overflow: 'hidden', + scrollbarGutter: 'stable', }} > {React.cloneElement( @@ -297,6 +300,7 @@ function StickyWrap({ style={{ height: bodyHeight, overflow: 'auto', + scrollbarGutter: 'stable', }} onScroll={sticky.hasHorizontalScroll ? onScroll : undefined} >