diff --git a/superset/assets/src/components/Button.jsx b/superset/assets/src/components/Button.jsx index 120113de7e..d895a02d20 100644 --- a/superset/assets/src/components/Button.jsx +++ b/superset/assets/src/components/Button.jsx @@ -12,6 +12,8 @@ const defaultProps = { placement: 'top', }; +const BUTTON_WRAPPER_STYLE = { display: 'inline-block', cursor: 'not-allowed' }; + export default function Button(props) { const buttonProps = Object.assign({}, props); const tooltip = props.tooltip; @@ -24,8 +26,19 @@ export default function Button(props) { {props.children} ); - if (props.tooltip) { - button = ( + if (tooltip) { + if (props.disabled) { + // Working around the fact that tooltips don't get triggered when buttons are disabled + // https://github.com/react-bootstrap/react-bootstrap/issues/1588 + buttonProps.style = { pointerEvents: 'none' }; + button = ( +