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
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:
- Created 3 years ago
- Comments:11 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s actually not a duplicate because this is about the table body, not the table header.
这个问题确实相当影响美观,还没有解决吧