mirror of https://github.com/apache/superset.git
parent
dcafabd183
commit
c79077d85d
|
@ -27,6 +27,7 @@ import {
|
||||||
SortIndicator,
|
SortIndicator,
|
||||||
} from 'react-virtualized';
|
} from 'react-virtualized';
|
||||||
import { getTextDimension } from '@superset-ui/dimension';
|
import { getTextDimension } from '@superset-ui/dimension';
|
||||||
|
import TooltipWrapper from '../TooltipWrapper';
|
||||||
|
|
||||||
function getTextWidth(text, font = '12px Roboto') {
|
function getTextWidth(text, font = '12px Roboto') {
|
||||||
return getTextDimension({ text, style: { font } }).width;
|
return getTextDimension({ text, style: { font } }).width;
|
||||||
|
@ -138,12 +139,14 @@ export default class FilterableTable extends PureComponent {
|
||||||
|
|
||||||
headerRenderer({ dataKey, label, sortBy, sortDirection }) {
|
headerRenderer({ dataKey, label, sortBy, sortDirection }) {
|
||||||
return (
|
return (
|
||||||
|
<TooltipWrapper label="header" tooltip={label}>
|
||||||
<div className="header-style">
|
<div className="header-style">
|
||||||
{label}
|
{label}
|
||||||
{sortBy === dataKey &&
|
{sortBy === dataKey &&
|
||||||
<SortIndicator sortDirection={sortDirection} />
|
<SortIndicator sortDirection={sortDirection} />
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
</TooltipWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue