diff --git a/frontend/src/metabase/components/MetadataInfo/DimensionInfoPopover/DimensionInfoPopover.tsx b/frontend/src/metabase/components/MetadataInfo/DimensionInfoPopover/DimensionInfoPopover.tsx index 4d5f27f034d0c8b29e30613a16359d228e5dca05..80ff169ce100586e72992b081d64b6bbb9e283cc 100644 --- a/frontend/src/metabase/components/MetadataInfo/DimensionInfoPopover/DimensionInfoPopover.tsx +++ b/frontend/src/metabase/components/MetadataInfo/DimensionInfoPopover/DimensionInfoPopover.tsx @@ -16,16 +16,22 @@ const propTypes = { dimension: PropTypes.instanceOf(Dimension), children: PropTypes.node, placement: PropTypes.string, + disabled: PropTypes.bool, }; type Props = { dimension: Dimension } & Pick< ITippyPopoverProps, - "children" | "placement" + "children" | "placement" | "disabled" >; const className = "dimension-info-popover"; -function DimensionInfoPopover({ dimension, children, placement }: Props) { +function DimensionInfoPopover({ + dimension, + children, + placement, + disabled, +}: Props) { // avoid a scenario where we may have a Dimension instance but not enough metadata // to even show a display name (probably indicative of a bug) const hasMetadata = !!(dimension && dimension.displayName()); @@ -36,6 +42,7 @@ function DimensionInfoPopover({ dimension, children, placement }: Props) { delay={isCypressActive ? 0 : POPOVER_DELAY} interactive placement={placement || "left-start"} + disabled={disabled} content={<WidthBoundDimensionInfo dimension={dimension} />} onTrigger={instance => { const dimensionInfoPopovers = document.querySelectorAll( diff --git a/frontend/src/metabase/visualizations/components/TableInteractive.jsx b/frontend/src/metabase/visualizations/components/TableInteractive.jsx index 9585a7b942e4cfaff8808cf8de2106f79fe9b96c..f4732f515eaa662ce78cfd2cd8414b702c9b705d 100644 --- a/frontend/src/metabase/visualizations/components/TableInteractive.jsx +++ b/frontend/src/metabase/visualizations/components/TableInteractive.jsx @@ -131,7 +131,7 @@ export default class TableInteractive extends Component { } shouldComponentUpdate(nextProps, nextState) { - const PROP_KEYS = ["width", "height", "settings", "data"]; + const PROP_KEYS = ["width", "height", "settings", "data", "clicked"]; // compare specific props and state to determine if we should re-render return ( !_.isEqual( @@ -650,6 +650,7 @@ export default class TableInteractive extends Component { <DimensionInfoPopover placement="bottom-start" dimension={this.getDimension(column, this.props.query)} + disabled={this.props.clicked != null} > {renderTableHeaderWrapper( <Ellipsified tooltip={columnTitle}> diff --git a/frontend/src/metabase/visualizations/components/Visualization.jsx b/frontend/src/metabase/visualizations/components/Visualization.jsx index 08a6752c901d15fe4cd7c0a2d2fcf54d9b57a055..4d1fc1c7dab20da27a10acbae13a956664fd3526 100644 --- a/frontend/src/metabase/visualizations/components/Visualization.jsx +++ b/frontend/src/metabase/visualizations/components/Visualization.jsx @@ -503,6 +503,7 @@ export default class Visualization extends React.PureComponent { card={series[0].card} // convenience for single-series visualizations data={series[0].data} // convenience for single-series visualizations hovered={hovered} + clicked={clicked} headerIcon={hasHeader ? null : headerIcon} onHoverChange={this.handleHoverChange} onVisualizationClick={this.handleVisualizationClick}