Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Table does not need to scroll to appear scrollbar Table无需滚动出现滚动条 #32764

Closed
cwjTerrace opened this issue Nov 5, 2021 · 2 comments
Labels
🎱 Collaborate PR only Need confirm with Designer or Core member improvement improve some features

Comments

@cwjTerrace
Copy link
Contributor

重现链接

https://codesandbox.io/s/gu-ding-tou-he-lie-antd-4-17-0-alpha-9-forked-3frdu

antd 版本

4.16.13

重现步骤

当使用scroll={{ x: 1500, y: 300 }} 当内容不足的也会强制出现纵向滚动条,样式会比较丑,特别是在没有横向滚动条的情况下,我看了下,ant-table-body给了overflow: auto scroll,纵向强制scroll,我想知道为什么?
image

期望的结果是什么?

overflowY也是auto

实际的结果是什么?

overflowY是scroll

浏览器

Edge

浏览器版本

No response

操作系统

MacOS

其他

@cwjTerrace cwjTerrace changed the title [Bug] 请替换成合适的标题 [Bug] Table无需滚动出现滚动条 Nov 5, 2021
@cwjTerrace cwjTerrace changed the title [Bug] Table无需滚动出现滚动条 [Bug] Table does not need to scroll to appear scrollbar Table无需滚动出现滚动条 Nov 5, 2021
@zombieJ
Copy link
Member

zombieJ commented Nov 5, 2021

不同系统对于滚动条展示是否占位会有所不同,检测滚动条是否滚动会有额外的性能消耗。因而滚动使用固定样式。

@zombieJ zombieJ added improvement improve some features 🎱 Collaborate PR only Need confirm with Designer or Core member labels Nov 5, 2021
@afc163
Copy link
Member

afc163 commented Nov 5, 2021

Duplicate of #29082

@afc163 afc163 marked this as a duplicate of #29082 Nov 5, 2021
@afc163 afc163 closed this as completed Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎱 Collaborate PR only Need confirm with Designer or Core member improvement improve some features
Projects
None yet
Development

No branches or pull requests

3 participants