Skip to content

Commit

Permalink
display tooltip when disabled (apache#16837)
Browse files Browse the repository at this point in the history
  • Loading branch information
AAfghahi authored and Emmanuel Bavoux committed Nov 14, 2021
1 parent f608070 commit 8cc8038
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset-frontend/src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ export default function Button(props: ButtonProps) {
id={`${kebabCase(tooltip)}-tooltip`}
title={tooltip}
>
{button}
{/* this ternary wraps the button in a span so that the tooltip shows up
when the button is disabled. */}
{disabled ? <span>{button}</span> : button}
</Tooltip>
);
}
Expand Down

0 comments on commit 8cc8038

Please sign in to comment.