Skip to content

Commit

Permalink
Force show tooltip D&D off
Browse files Browse the repository at this point in the history
  • Loading branch information
geido committed Aug 6, 2021
1 parent 48fcdfa commit 2398c7b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ export default function OptionWrapper(
});

const shouldShowTooltip =
(!isDragging &&
tooltipTitle &&
label &&
tooltipTitle.length > label.length) ||
(!isDragging && tooltipTitle && label && tooltipTitle !== label) ||
(!isDragging &&
labelRef &&
labelRef.current &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,15 @@ export const OptionControlLabel = ({

const getLabelContent = () => {
const shouldShowTooltip =
!isDragging &&
labelRef &&
labelRef.current &&
labelRef.current.scrollWidth > labelRef.current.clientWidth;
(!isDragging &&
typeof label === 'string' &&
tooltipTitle &&
label &&
tooltipTitle !== label) ||
(!isDragging &&
labelRef &&
labelRef.current &&
labelRef.current.scrollWidth > labelRef.current.clientWidth);

if (savedMetric && hasMetricName) {
return (
Expand Down

0 comments on commit 2398c7b

Please sign in to comment.