mirror of
https://github.com/apache/superset.git
synced 2024-09-16 02:29:39 -04:00
fix: pivot-table-fixed (#1360)
This commit is contained in:
parent
055d9f8e42
commit
43526009f3
@ -110,6 +110,10 @@ function PivotTable(element, props) {
|
||||
});
|
||||
});
|
||||
|
||||
$container.find('table').each(function fullWidth() {
|
||||
this.style = 'width: 100%';
|
||||
});
|
||||
|
||||
if (numGroups === 1) {
|
||||
// When there is only 1 group by column,
|
||||
// we use the DataTable plugin to make the header fixed.
|
||||
|
@ -43,7 +43,7 @@ const Styles = styled.div<PivotTableStylesProps>`
|
||||
${({ height, width, margin }) => `
|
||||
margin: ${margin}px;
|
||||
height: ${height - margin * 2}px;
|
||||
width: ${width - margin * 2}px;
|
||||
width: ${typeof width === 'string' ? parseInt(width, 10) : width - margin * 2}px;
|
||||
`}
|
||||
`;
|
||||
|
||||
|
@ -31,7 +31,7 @@ import { ColorFormatters } from '@superset-ui/chart-controls';
|
||||
|
||||
export interface PivotTableStylesProps {
|
||||
height: number;
|
||||
width: number;
|
||||
width: number | string;
|
||||
margin: number;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user