From 04f7ecad1cebba2dd247ba40b71928fb0cef1def Mon Sep 17 00:00:00 2001 From: AAfghahi <48933336+AAfghahi@users.noreply.github.com> Date: Fri, 24 Sep 2021 15:56:33 -0400 Subject: [PATCH] display tooltip when disabled (#16837) --- superset-frontend/src/components/Button/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/components/Button/index.tsx b/superset-frontend/src/components/Button/index.tsx index 5199d26f4..7daf0eb5b 100644 --- a/superset-frontend/src/components/Button/index.tsx +++ b/superset-frontend/src/components/Button/index.tsx @@ -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 ? {button} : button} ); }