Skip to content

Commit

Permalink
fix: change sticky scroll bar default state (#1139)
Browse files Browse the repository at this point in the history
* fix: change sticky scroll bar default state

* chore: remove console

* test: fix

* test: fix
  • Loading branch information
linxianxi authored Jun 5, 2024
1 parent 405d6f2 commit 89b610d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/stickyScrollBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const StickyScrollBar: React.ForwardRefRenderFunction<unknown, StickyScrollBarPr
isHiddenScrollBar: boolean;
}>({
scrollLeft: 0,
isHiddenScrollBar: false,
isHiddenScrollBar: true,
});
const refState = React.useRef<{
delta: number;
Expand Down
2 changes: 2 additions & 0 deletions tests/Sticky.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ describe('Table.Sticky', () => {
await act(async () => {
vi.runAllTimers();
await Promise.resolve();
wrapper.update();
});

expect(wrapper.find('.rc-table-sticky-scroll').get(0)).not.toBeUndefined();
Expand Down Expand Up @@ -392,6 +393,7 @@ describe('Table.Sticky', () => {
await act(async () => {
vi.runAllTimers();
await Promise.resolve();
wrapper.update();
});

expect(wrapper.find('.rc-table-sticky-scroll').get(0)).toBeTruthy();
Expand Down

0 comments on commit 89b610d

Please sign in to comment.