You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ch...@apache.org on 2019/03/29 13:45:50 UTC

[incubator-superset] branch master updated: Fix double scroll bars when content of sql result table overflows horizontally (#7168)

This is an automated email from the ASF dual-hosted git repository.

christine pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 7ffcabd  Fix double scroll bars when content of sql result table overflows horizontally (#7168)
7ffcabd is described below

commit 7ffcabd5c08bbe6aa022e66590c0ce805ae13f08
Author: Christine Chambers <ch...@gmail.com>
AuthorDate: Fri Mar 29 06:45:44 2019 -0700

    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.
---
 superset/assets/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 d557c6a..72a22c7 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;
     }