Skip to content

Commit 3896695

Browse files
committed
cherry pick 9d6f5be
1 parent bf33bfd commit 3896695

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Table.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,11 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
353353
maxHeight: scroll.y,
354354
};
355355
}
356+
356357
if (fixColumn) {
357358
scrollXStyle = { overflowX: 'scroll' };
358359
scrollTableStyle = {
359-
width: scroll.x === true ? 'max-content' : scroll.x,
360+
width: scroll.x === true ? 'auto' : scroll.x,
360361
minWidth: '100%',
361362
};
362363
}

tests/Scroll.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('Table.Scroll', () => {
1414

1515
it('renders scroll.x is true', () => {
1616
const wrapper = mount(createTable({ scroll: { x: true } }));
17-
expect(wrapper.find('table').props().style.width).toEqual('max-content');
17+
expect(wrapper.find('table').props().style.width).toEqual('auto');
1818
});
1919

2020
it('renders scroll.x is a number', () => {

0 commit comments

Comments
 (0)