Skip to content

Commit a146e9b

Browse files
committed
fix: overflowY = 'auto' when set scroll.y
1 parent 5fb8f12 commit a146e9b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Table.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ function Table<RecordType extends DefaultRecordType>(tableProps: TableProps<Reco
315315

316316
if (fixHeader) {
317317
scrollYStyle = {
318-
overflowY: 'scroll',
318+
overflowY: 'auto',
319319
maxHeight: scroll.y,
320320
};
321321
}

tests/Scroll.spec.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Table.Scroll', () => {
3535
it('renders scroll.x and scroll.y are both true', () => {
3636
const wrapper = mount(createTable({ scroll: { x: true, y: 200 } }));
3737
expect(wrapper.find('.rc-table-body').props().style.overflowX).toEqual('auto');
38-
expect(wrapper.find('.rc-table-body').props().style.overflowY).toEqual('scroll');
38+
expect(wrapper.find('.rc-table-body').props().style.overflowY).toEqual('auto');
3939
});
4040

4141
it('fire scroll event', () => {

0 commit comments

Comments
 (0)