From d1dad1e63d7646b290331fa28f9104f9e46c549b 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) (cherry picked from commit e6d2fb6fdfa4d741de16b322bdc4bd01fb559413) --- .../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 067d071ee19..e154a521f69 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} >