Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
5 changes: 3 additions & 2 deletions src/stickyScrollBar.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@ import TableContext from './context/TableContext';
import { useLayoutState } from './hooks/useFrame';
import raf from 'rc-util/lib/raf';
import { getOffset } from './utils/offsetUtil';
import { getDOM } from 'rc-util/lib/Dom/findDOMNode';

interface StickyScrollBarProps {
scrollBodyRef: React.RefObject<HTMLDivElement>;
Expand DownExpand Up@@ -150,8 +151,8 @@ const StickyScrollBar: React.ForwardRefRenderFunction<unknown, StickyScrollBarPr
React.useEffect(() => {
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;
Expand Down