diff --git a/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx b/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx index 19a037b0190e..fb3313924fd3 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx @@ -21,6 +21,7 @@ import { css, styled } from '@apache-superset/core/theme'; export default styled.div` ${({ theme }) => css` /* Base table styles */ + padding: ${theme.sizeUnit * 5}px; table { width: 100%; min-width: auto; diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx index 1b9c77c33eea..fb6c7421318e 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx @@ -1608,8 +1608,8 @@ export default function TableChart( pageSize={pageSize} serverPaginationData={serverPaginationData} pageSizeOptions={pageSizeOptions} - width={widthFromState} - height={heightFromState} + width={Math.max(0, widthFromState - theme.sizeUnit * 10)} + height={Math.max(0, heightFromState - theme.sizeUnit * 10)} serverPagination={serverPagination} onServerPaginationChange={handleServerPaginationChange} onColumnOrderChange={() => setColumnOrderToggle(!columnOrderToggle)}