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

Table gets overflow scroll instead of auto when scroll is set #29082

Open
1 task
fgblomqvist opened this issue Jan 27, 2021 · 14 comments
Open
1 task

Table gets overflow scroll instead of auto when scroll is set #29082

fgblomqvist opened this issue Jan 27, 2021 · 14 comments
Labels

Comments

@fgblomqvist
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Look at the table, it has a gray scrollbar-holder even though it's not tall enough to scroll.

What is expected?

It should have overflow-y: auto instead of overflow-y: scroll since auto allows scrolling when max-height is reached, while scroll always

What is actually happening?

It gets overflow-y: scroll, leading to a gray bar at all times.

Environment Info
antd 4.6.4
React 16.13.1
System N/A
Browser Chrome 88
@fgblomqvist
Copy link
Author

Screen Shot 2021-01-27 at 9 15 29 AM

@afc163 afc163 marked this as a duplicate of #18879 Jan 28, 2021
@afc163 afc163 closed this as completed Jan 28, 2021
@fgblomqvist
Copy link
Author

It's actually not a duplicate because this is about the table body, not the table header.

@Zake95
Copy link

Zake95 commented Mar 6, 2021

这个issue也没有提出解决的方案啊

@Greenxq
Copy link

Greenxq commented Mar 16, 2021

问题解决了吗?

@1195002442
Copy link

这个问题没有解决吧

@anminlu
Copy link

anminlu commented Mar 24, 2021

这个问题确实相当影响美观,还没有解决吧

@linxianxi
Copy link
Contributor

@afc163 没有改成 overflow: auto 是会出现什么问题吗?

@hi-bella
Copy link

changing the table body overflow: auto will make the table header not align with the table body.

@sagarsoni7
Copy link

Anybody able to find a solution or workaround?

@debughao
Copy link

+1 这样在window系统的浏览器太丑了

@pokatomnik
Copy link

This issue is NOT because of antd. Antd uses rc-table internally. And the rc-table has the following code (take a look at styele initialization). Unfortunately, this issue can't be resolved without corresponding improvements in the rc-table.

@afc163
Copy link
Member

afc163 commented Sep 21, 2023

The history about fixing this issue: #6800 (comment)

@utali
Copy link

utali commented Mar 19, 2024

大佬们,这个问题还没解决吗?

@841660202
Copy link

841660202 commented Apr 10, 2024

代码中出现了overflow: auto scroll,应该是overflow: auto 才对

image

强行覆盖

.ant-table-body {
  overflow: auto!important;
}

这么改了就会对不齐了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests