Skip to content

Commit 9d6f5be

Browse files
committed
🐛 improve Table scroll behavior when scroll.x is true
close ant-design/ant-design#21596
1 parent e3ee199 commit 9d6f5be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BaseTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class BaseTable<ValueType> extends React.Component<BaseTableProps<ValueType>> {
149149

150150
if (!fixed && scroll.x) {
151151
// not set width, then use content fixed width
152-
tableStyle.width = scroll.x === true ? 'max-content' : scroll.x;
152+
tableStyle.width = scroll.x === true ? 'auto' : scroll.x;
153153
}
154154

155155
const Table = hasBody ? components.table : 'table';

0 commit comments

Comments
 (0)