Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function StickyWrap({
const scrollBodyRef = useRef<HTMLDivElement>(null); // main body

const scrollBarSize = getScrollBarSize();
const { bodyHeight, columnWidths } = sticky;
const { bodyHeight, columnWidths, hasVerticalScroll } = sticky;
const needSizer =
!columnWidths ||
sticky.width !== maxWidth ||
Expand Down Expand Up @@ -283,13 +283,18 @@ function StickyWrap({
</colgroup>
);

const headerContainerWidth = hasVerticalScroll
? maxWidth - scrollBarSize
: maxWidth;

headerTable = (
<div
key="header"
ref={scrollHeaderRef}
style={{
overflow: 'hidden',
scrollbarGutter: 'stable',
width: headerContainerWidth,
boxSizing: 'border-box',
}}
role="presentation"
>
Expand All @@ -309,7 +314,8 @@ function StickyWrap({
ref={scrollFooterRef}
style={{
overflow: 'hidden',
scrollbarGutter: 'stable',
width: headerContainerWidth,
boxSizing: 'border-box',
}}
role="presentation"
>
Expand Down Expand Up @@ -339,6 +345,8 @@ function StickyWrap({
height: bodyHeight,
overflow: 'auto',
scrollbarGutter: 'stable',
width: maxWidth,
boxSizing: 'border-box',
}}
css={scrollBarStyles}
onScroll={sticky.hasHorizontalScroll ? onScroll : undefined}
Expand Down
Loading