You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2021/01/16 06:07:18 UTC

[superset] 04/05: fix: height on grid results (#12558)

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

villebro pushed a commit to branch 1.0
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 147f750829c3c67889598b2d933f62e4a4b10aa5
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Fri Jan 15 13:54:55 2021 -0800

    fix: height on grid results (#12558)
---
 .../components/FilterableTable/FilterableTable.tsx | 74 +++++++++++-----------
 1 file changed, 38 insertions(+), 36 deletions(-)

diff --git a/superset-frontend/src/components/FilterableTable/FilterableTable.tsx b/superset-frontend/src/components/FilterableTable/FilterableTable.tsx
index 5b51f99..67bea7f 100644
--- a/superset-frontend/src/components/FilterableTable/FilterableTable.tsx
+++ b/superset-frontend/src/components/FilterableTable/FilterableTable.tsx
@@ -463,43 +463,45 @@ export default class FilterableTable extends PureComponent<
 
     // fix height of filterable table
     return (
-      <ScrollSync>
-        {({ onScroll, scrollTop }) => (
-          <div
-            style={{ height }}
-            className="filterable-table-container Table"
-            data-test="filterable-table-container"
-            ref={this.container}
-          >
-            <div className="LeftColumn">
-              <Grid
-                cellRenderer={this.renderGridCellHeader}
-                columnCount={orderedColumnKeys.length}
-                columnWidth={getColumnWidth}
-                height={rowHeight}
-                rowCount={1}
-                rowHeight={rowHeight}
-                scrollTop={scrollTop}
-                width={this.totalTableWidth}
-              />
-            </div>
-            <div className="RightColumn">
-              <Grid
-                cellRenderer={this.renderGridCell}
-                columnCount={orderedColumnKeys.length}
-                columnWidth={getColumnWidth}
-                height={totalTableHeight - rowHeight}
-                onScroll={onScroll}
-                overscanColumnCount={overscanColumnCount}
-                overscanRowCount={overscanRowCount}
-                rowCount={this.list.size}
-                rowHeight={rowHeight}
-                width={this.totalTableWidth}
-              />
+      <StyledFilterableTable>
+        <ScrollSync>
+          {({ onScroll, scrollTop }) => (
+            <div
+              style={{ height }}
+              className="filterable-table-container Table"
+              data-test="filterable-table-container"
+              ref={this.container}
+            >
+              <div className="LeftColumn">
+                <Grid
+                  cellRenderer={this.renderGridCellHeader}
+                  columnCount={orderedColumnKeys.length}
+                  columnWidth={getColumnWidth}
+                  height={rowHeight}
+                  rowCount={1}
+                  rowHeight={rowHeight}
+                  scrollTop={scrollTop}
+                  width={this.totalTableWidth}
+                />
+              </div>
+              <div className="RightColumn">
+                <Grid
+                  cellRenderer={this.renderGridCell}
+                  columnCount={orderedColumnKeys.length}
+                  columnWidth={getColumnWidth}
+                  height={totalTableHeight - rowHeight}
+                  onScroll={onScroll}
+                  overscanColumnCount={overscanColumnCount}
+                  overscanRowCount={overscanRowCount}
+                  rowCount={this.list.size}
+                  rowHeight={rowHeight}
+                  width={this.totalTableWidth}
+                />
+              </div>
             </div>
-          </div>
-        )}
-      </ScrollSync>
+          )}
+        </ScrollSync>
+      </StyledFilterableTable>
     );
   }