mirror of
https://github.com/apache/superset.git
synced 2026-05-10 10:25:51 +00:00
fix(explore): Filters Tooltip is not showing the full content (#14618)
* Add getTooltipTitle * Fix tests
This commit is contained in:
@@ -36,6 +36,7 @@ import {
|
||||
|
||||
const defaultProps = {
|
||||
label: <span>Test label</span>,
|
||||
tooltipTitle: 'This is a tooltip title',
|
||||
onRemove: jest.fn(),
|
||||
onMoveLabel: jest.fn(),
|
||||
onDropLabel: jest.fn(),
|
||||
|
||||
@@ -167,6 +167,7 @@ export const OptionControlLabel = ({
|
||||
type,
|
||||
index,
|
||||
isExtra,
|
||||
tooltipTitle,
|
||||
...props
|
||||
}: {
|
||||
label: string | React.ReactNode;
|
||||
@@ -181,6 +182,7 @@ export const OptionControlLabel = ({
|
||||
type: string;
|
||||
index: number;
|
||||
isExtra?: boolean;
|
||||
tooltipTitle: string;
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
@@ -246,7 +248,7 @@ export const OptionControlLabel = ({
|
||||
if (savedMetric?.metric_name) {
|
||||
return <StyledMetricOption metric={savedMetric} />;
|
||||
}
|
||||
return <Tooltip title={label}>{label}</Tooltip>;
|
||||
return <Tooltip title={tooltipTitle}>{label}</Tooltip>;
|
||||
};
|
||||
|
||||
const getOptionControlContent = () => (
|
||||
|
||||
Reference in New Issue
Block a user