-
Notifications
You must be signed in to change notification settings - Fork 355
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 width includes scrollbar #762
Comments
Seems to be fixed in v3.x |
We added a |
mixonic
pushed a commit
that referenced
this issue
Sep 29, 2021
Based on merging #763 and the report that this is correct in 3.x, I'm going to close this issue. Please let me know if I'm missing anything! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
We've got a use-case where we need to scroll inside the table to see all the rows---the overflow is then on the
.ember-table
component. The issue seems to be with the size of thetable
tag: inutils/element.js/
getInnerClientRect()
, the JS methodelement.getBoundingClientRect()
is used which is useful to find the boundaries of the element but not its client size since it counts the scrollbar as part of the width of the element...It results as the last column being 'stomped on' by the vertical-scrollbar (in red in the picture below) and therefore the width of the
table
tag is now too wide for itsoverflow: auto
parent and we get a horizontal-scrollbar (in green in the picture below):In this picture, we can see that the table (highlighted in blue by the browser in the picture below) is its
offset
parent width, goes under the vertical scrollbar (in yellow in the picture below) and therefore the vertical scrollbar (in red in the picture below):What we aim to achieve, a vertical scrollbar (in red in the picture below) that resides outside the table and normal flow (no horizontal overflow, in green):
We need to recalculate when the table is populated: depending on the number of rows, we may or may not need to overflow and can't have a blank space.
The text was updated successfully, but these errors were encountered: