From 765f0482110952dd3fa9aefc102bdd73e6499d8a Mon Sep 17 00:00:00 2001 From: linxianxi <904492381@qq.com> Date: Wed, 7 Feb 2024 16:00:15 +0800 Subject: [PATCH] chore: update --- src/stickyScrollBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stickyScrollBar.tsx b/src/stickyScrollBar.tsx index ce3c5453e..a77765405 100644 --- a/src/stickyScrollBar.tsx +++ b/src/stickyScrollBar.tsx @@ -16,11 +16,11 @@ interface StickyScrollBarProps { } const StickyScrollBar: React.ForwardRefRenderFunction = ( - { scrollBodyRef, onScroll, offsetScroll, container, data }, + { scrollBodyRef, onScroll, offsetScroll, container }, ref, ) => { const prefixCls = useContext(TableContext, 'prefixCls'); - const bodyScrollWidth = scrollBodyRef.current?.scrollWidth || 0; + const bodyScrollWidth = scrollBodyRef.current.scrollWidth || 0; const bodyWidth = scrollBodyRef.current?.clientWidth || 0; const scrollBarWidth = bodyScrollWidth && bodyWidth * (bodyWidth / bodyScrollWidth);