Skip to content
Open
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 src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ function Table<RecordType extends DefaultRecordType>(tableProps: TableProps<Reco

if (fixHeader) {
scrollYStyle = {
overflowY: 'scroll',
overflowY: 'auto',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto will break the width calculation which makes border out of table:
截屏2023-08-15 10 02 02

maxHeight: scroll.y,
};
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Scroll.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Table.Scroll', () => {
it('renders scroll.x and scroll.y are both true', () => {
const wrapper = mount(createTable({ scroll: { x: true, y: 200 } }));
expect(wrapper.find('.rc-table-body').props().style.overflowX).toEqual('auto');
expect(wrapper.find('.rc-table-body').props().style.overflowY).toEqual('scroll');
expect(wrapper.find('.rc-table-body').props().style.overflowY).toEqual('auto');
});

it('fire scroll event', () => {
Expand Down