Fix double scroll bars when content of sql result table overflows horizontally (#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.
This commit is contained in:
Christine Chambers 2019-03-29 06:45:44 -07:00 committed by GitHub
parent 41c13152a9
commit 7ffcabd5c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -164,7 +164,6 @@ export default class FilterableTable extends PureComponent {
const {
filterText,
headerHeight,
height,
orderedColumnKeys,
overscanRowCount,
rowHeight,
@ -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;
}