Skip to content

Commit

Permalink
implement #304
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jun 4, 2019
1 parent 11a31cd commit 810e82b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/BodyTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function BodyTable(props, { table }) {
useFixedHeader = true;

// Add negative margin bottom for scroll bar overflow bug
const scrollbarWidth = measureScrollbar({ prefixCls });
const scrollbarWidth = measureScrollbar({ direction: 'horizontal', prefixCls });
if (scrollbarWidth > 0 && fixed) {
bodyStyle.marginBottom = `-${scrollbarWidth}px`;
bodyStyle.paddingBottom = '0px';
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function measureScrollbar({ direction = 'vertical', prefixCls }) {
scrollDiv.style[scrollProp] = scrollbarMeasure[scrollProp];
});
// apply hide scrollbar className ahead
scrollDiv.className = `${prefixCls}-hide-scrollbar`;
scrollDiv.className = `${prefixCls}-hide-scrollbar scroll-div-append-to-body`;
// Append related overflow style
if (isVertical) {
scrollDiv.style.overflowY = 'scroll';
Expand Down

0 comments on commit 810e82b

Please sign in to comment.