Skip to content

Commit

Permalink
fix: Position of arrows in Table chart (apache#18739)
Browse files Browse the repository at this point in the history
* Fix arrow position

* Improve position

* Add right position

* Improve styling
  • Loading branch information
geido committed Feb 22, 2022
1 parent 7cad143 commit a9a8929
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 2 additions & 4 deletions superset-frontend/plugins/plugin-chart-table/src/Styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,14 @@ export default styled.div`
}
thead > tr > th {
padding-right: 1.4em;
padding-right: 0;
position: relative;
background: ${({ theme: { colors } }) => colors.grayscale.light5};
text-align: left;
}
th svg {
color: ${({ theme: { colors } }) => colors.grayscale.light2};
position: relative;
vertical-align: middle;
margin: 0 ${({ theme: { gridUnit } }) => gridUnit}px;
margin: ${({ theme: { gridUnit } }) => gridUnit / 2}px;
}
th.is-sorted svg {
color: ${({ theme: { colors } }) => colors.grayscale.base};
Expand Down
11 changes: 9 additions & 2 deletions superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,15 @@ export default function TableChart<D extends DataRecord = DataRecord>(
}}
/>
) : null}
{label}
<SortIcon column={col} />
<div
css={{
display: 'inline-flex',
alignItems: 'center',
}}
>
<span>{label}</span>
<SortIcon column={col} />
</div>
</th>
),
Footer: totals ? (
Expand Down

0 comments on commit a9a8929

Please sign in to comment.