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 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;