You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2021/08/17 07:59:04 UTC

[superset] branch master updated: Fix table height (#16275)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 9876c36  Fix table height (#16275)
9876c36 is described below

commit 9876c36f6ec9cdfc7ad74efdffefd5c77b645161
Author: Geido <60...@users.noreply.github.com>
AuthorDate: Tue Aug 17 09:58:13 2021 +0200

    Fix table height (#16275)
---
 superset-frontend/src/components/TableView/TableView.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/superset-frontend/src/components/TableView/TableView.tsx b/superset-frontend/src/components/TableView/TableView.tsx
index dfc6a63..6270ab2 100644
--- a/superset-frontend/src/components/TableView/TableView.tsx
+++ b/superset-frontend/src/components/TableView/TableView.tsx
@@ -56,14 +56,15 @@ const EmptyWrapper = styled.div`
 `;
 
 const TableViewStyles = styled.div<{
+  hasPagination?: boolean;
   isPaginationSticky?: boolean;
   scrollTable?: boolean;
   small?: boolean;
 }>`
-  ${({ scrollTable, theme }) =>
+  ${({ hasPagination, scrollTable, theme }) =>
     scrollTable &&
     `
-    height: 300px;
+    height: ${hasPagination ? '300px' : '380px'};
     margin-bottom: ${theme.gridUnit * 4}px;
     overflow: auto;
   `}
@@ -191,10 +192,11 @@ const TableView = ({
   }
 
   const isEmpty = !loading && content.length === 0;
+  const hasPagination = pageCount > 1 && withPagination;
 
   return (
     <>
-      <TableViewStyles {...props}>
+      <TableViewStyles hasPagination={hasPagination} {...props}>
         <TableCollection
           getTableProps={getTableProps}
           getTableBodyProps={getTableBodyProps}
@@ -217,7 +219,7 @@ const TableView = ({
           </EmptyWrapperComponent>
         )}
       </TableViewStyles>
-      {pageCount > 1 && withPagination && (
+      {hasPagination && (
         <PaginationStyles
           className="pagination-container"
           isPaginationSticky={props.isPaginationSticky}