Skip to content

Commit

Permalink
fix: Table Autosizing Has Unnecessary Scroll Bars (#19628)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomedina248 authored Apr 11, 2022
1 parent d8b9e72 commit 9554135
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ function StickyWrap({
.clientHeight;
const ths = bodyThead.childNodes[0]
.childNodes as NodeListOf<HTMLTableHeaderCellElement>;
const widths = Array.from(ths).map(th => th.clientWidth);
const widths = Array.from(ths).map(
th => th.getBoundingClientRect()?.width || th.clientWidth,
);
const [hasVerticalScroll, hasHorizontalScroll] = needScrollBar({
width: maxWidth,
height: maxHeight - theadHeight - tfootHeight,
Expand Down

0 comments on commit 9554135

Please sign in to comment.