Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
linxianxi committed Feb 5, 2024
1 parent 0b59d5c commit 7094e2b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ function Table<RecordType extends DefaultRecordType>(
const stickyRef = React.useRef<{ setScrollLeft: (left: number) => void }>();
const { isSticky, offsetHeader, offsetSummary, offsetScroll, stickyClassName, container } =
useSticky(sticky, prefixCls);
const showStickyScrollbar =
isSticky && scrollBodyRef.current && scrollBodyRef.current instanceof Element;

// Footer (Fix footer must fixed header)
const summaryNode = React.useMemo(() => summary?.(mergedData), [summary, mergedData]);
Expand Down Expand Up @@ -701,7 +699,7 @@ function Table<RecordType extends DefaultRecordType>(
</FixedHolder>
)}

{showStickyScrollbar && (
{isSticky && scrollBodyRef.current && scrollBodyRef.current instanceof Element && (
<StickyScrollBar
ref={stickyRef}
offsetScroll={offsetScroll}
Expand Down

0 comments on commit 7094e2b

Please sign in to comment.