From 7ffcabd5c08bbe6aa022e66590c0ce805ae13f08 Mon Sep 17 00:00:00 2001 From: Christine Chambers Date: Fri, 29 Mar 2019 06:45:44 -0700 Subject: [PATCH] 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. --- .../src/components/FilterableTable/FilterableTable.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/superset/assets/src/components/FilterableTable/FilterableTable.jsx b/superset/assets/src/components/FilterableTable/FilterableTable.jsx index d557c6ab7..72a22c7ba 100644 --- a/superset/assets/src/components/FilterableTable/FilterableTable.jsx +++ b/superset/assets/src/components/FilterableTable/FilterableTable.jsx @@ -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; }