From 7f4a839c87b38a420b7247f85d6678287d00ebc8 Mon Sep 17 00:00:00 2001 From: Arash Date: Fri, 24 Sep 2021 13:10:54 -0400 Subject: [PATCH] display tooltip when disabled --- 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 5199d26f4f8a2..7daf0eb5b5dda 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} ); }