From a53c7d6fe668dbf6bbffaf28d8a7ee667e5a11c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Thu, 6 Mar 2025 22:26:18 +0800 Subject: [PATCH 1/2] fix: scroll logic --- src/stickyScrollBar.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/stickyScrollBar.tsx b/src/stickyScrollBar.tsx index 91b9537ac..284b25085 100644 --- a/src/stickyScrollBar.tsx +++ b/src/stickyScrollBar.tsx @@ -6,6 +6,7 @@ import TableContext from './context/TableContext'; import { useLayoutState } from './hooks/useFrame'; import raf from '@rc-component/util/lib/raf'; import { getOffset } from './utils/offsetUtil'; +import { getDOM } from '@rc-component/util/lib/Dom/findDOMNode'; const MOUSEUP_EVENT: keyof WindowEventMap = 'mouseup'; const MOUSEMOVE_EVENT: keyof WindowEventMap = 'mousemove'; @@ -153,8 +154,8 @@ const StickyScrollBar: React.ForwardRefRenderFunction { if (!scrollBodyRef.current) return; - const scrollParents: HTMLElement[] = []; - let parent: HTMLElement = scrollBodyRef.current; + const scrollParents: (HTMLElement | SVGElement)[] = []; + let parent = getDOM(scrollBodyRef.current); while (parent) { scrollParents.push(parent); parent = parent.parentElement; From fecd6879c98e373d4d7254f7be49eeeb46f9e2d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Thu, 6 Mar 2025 22:33:45 +0800 Subject: [PATCH 2/2] fix: ci --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5735e2d22..1fe5da5f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,5 +2,5 @@ name: ✅ test on: [push, pull_request] jobs: test: - uses: react-component/rc-test/.github/workflows/test.yml@main + uses: react-component/rc-test/.github/workflows/test-npm.yml@main secrets: inherit \ No newline at end of file