From 9876c36f6ec9cdfc7ad74efdffefd5c77b645161 Mon Sep 17 00:00:00 2001 From: Geido <60598000+geido@users.noreply.github.com> Date: Tue, 17 Aug 2021 09:58:13 +0200 Subject: [PATCH] Fix table height (#16275) --- .../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 dfc6a6357..6270ab2c1 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 ( <> - + )} - {pageCount > 1 && withPagination && ( + {hasPagination && (