Skip to content

Commit

Permalink
Fix double scroll bars when content of sql result table overflows hor…
Browse files Browse the repository at this point in the history
…izontally (#7168)

The PR substracts the scrollbar height from the height of the container of the react virtualized table so we don't see double scrollbars.
  • Loading branch information
xtinec authored Mar 29, 2019
1 parent 41c1315 commit 7ffcabd
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ export default class FilterableTable extends PureComponent {
const {
filterText,
headerHeight,
height,
orderedColumnKeys,
overscanRowCount,
rowHeight,
Expand All @@ -182,10 +181,12 @@ export default class FilterableTable extends PureComponent {
.update(list => sortDirection === SortDirection.DESC ? list.reverse() : list);
}

let { height } = this.props;
let totalTableHeight = height;
if (this.container && this.totalTableWidth > this.container.clientWidth) {
// exclude the height of the horizontal scroll bar from the height of the table
// if the content overflows
// and the height of the table container if the content overflows
height -= SCROLL_BAR_HEIGHT;
totalTableHeight -= SCROLL_BAR_HEIGHT;
}

Expand Down

0 comments on commit 7ffcabd

Please sign in to comment.