superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From christ...@apache.org
Subject [incubator-superset] branch lyftga updated: Fix double scroll bars when content of sql result table overflows horizontally (#7168)
Date Fri, 29 Mar 2019 13:52:37 GMT
This is an automated email from the ASF dual-hosted git repository.

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


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

commit 21834d35b5dd3c64647a3307bc8d06d55bafe930
Author: Christine Chambers <christine.d.hang@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.
    
    (cherry picked from commit 7ffcabd5c08bbe6aa022e66590c0ce805ae13f08)
---
 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 ed593f5..863507c 100644
--- a/superset/assets/src/components/FilterableTable/FilterableTable.jsx
+++ b/superset/assets/src/components/FilterableTable/FilterableTable.jsx
@@ -160,7 +160,6 @@ export default class FilterableTable extends PureComponent {
     const {
       filterText,
       headerHeight,
-      height,
       orderedColumnKeys,
       overscanRowCount,
       rowHeight,
@@ -178,10 +177,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;
     }
 


Mime
View raw message