From fdcc079e18c0e58098796ed635d0435e8f2c4870 Mon Sep 17 00:00:00 2001 From: Geido <60598000+geido@users.noreply.github.com> Date: Tue, 24 Aug 2021 11:58:24 +0300 Subject: [PATCH] fix: Make the scrollbar appear inside the table (#1310) * Scroll container * Add X scroll * Remove widht min-content --- .../src/PivotTableChart.tsx | 81 ++++++++++--------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx index b982a5a95a15..1483af646daf 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx +++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-chart-pivot-table/src/PivotTableChart.tsx @@ -44,10 +44,15 @@ const Styles = styled.div` margin: ${margin}px; height: ${height - margin * 2}px; width: ${width - margin * 2}px; - overflow-y: scroll; `} `; +const PivotTableWrapper = styled.div` + height: 100%; + max-width: fit-content; + overflow: auto; +`; + const METRIC_KEY = 'metric'; const iconStyle = { stroke: 'black', strokeWidth: '16px' }; @@ -254,42 +259,44 @@ export default function PivotTableChart(props: PivotTableProps) { return ( - , - arrowExpanded: , - }} - namesMapping={verboseMap} - /> + + , + arrowExpanded: , + }} + namesMapping={verboseMap} + /> + ); }