question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Table gets overflow scroll instead of auto when scroll is set

See original GitHub issue
  • 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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
fgblomqvistcommented, Jan 28, 2021

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

3reactions
LuAnmin-Githubcommented, Mar 24, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using "overflow: auto" on <table> parent element causes ...
Use overflow-y: scroll; instead of auto which causes the scroll bar to always appear, even when it is not needed. What makes this...
Read more >
overflow - CSS: Cascading Style Sheets - MDN Web Docs
The JavaScript Element.scrollTop property may be used to scroll an HTML element even when overflow is set to hidden . Formal definition. Initial...
Read more >
CSS overflow-x property - W3Schools
The overflow-x property specifies whether to clip the content, add a scroll bar, or display overflow content of a block-level element, when it...
Read more >
Overflow - Tailwind CSS
Use overflow-auto to add scrollbars to an element in the event that its content overflows the bounds of that element. Unlike overflow-scroll ,...
Read more >
Overflow · Bootstrap v5.0
This is an example of using .overflow-auto on an element with set width and height dimensions. By design, this content will vertically scroll....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found