Skip to content

Commit 89b610d

Browse files
authored
fix: change sticky scroll bar default state (#1139)
* fix: change sticky scroll bar default state * chore: remove console * test: fix * test: fix
1 parent 405d6f2 commit 89b610d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/stickyScrollBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const StickyScrollBar: React.ForwardRefRenderFunction<unknown, StickyScrollBarPr
3030
isHiddenScrollBar: boolean;
3131
}>({
3232
scrollLeft: 0,
33-
isHiddenScrollBar: false,
33+
isHiddenScrollBar: true,
3434
});
3535
const refState = React.useRef<{
3636
delta: number;

tests/Sticky.spec.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ describe('Table.Sticky', () => {
122122
await act(async () => {
123123
vi.runAllTimers();
124124
await Promise.resolve();
125+
wrapper.update();
125126
});
126127

127128
expect(wrapper.find('.rc-table-sticky-scroll').get(0)).not.toBeUndefined();
@@ -392,6 +393,7 @@ describe('Table.Sticky', () => {
392393
await act(async () => {
393394
vi.runAllTimers();
394395
await Promise.resolve();
396+
wrapper.update();
395397
});
396398

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

0 commit comments

Comments
 (0)