Skip to content

Commit cdaaeef

Browse files
committed
fix: showOnTruncate default to true only when alwaysShowTippyOnHover is undefined
1 parent eb04cf9 commit cdaaeef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Common/Tooltip/Tooltip.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import TippyJS from '@tippyjs/react'
33
import { TooltipProps } from './types'
44

55
const Tooltip = ({
6-
alwaysShowTippyOnHover = false,
7-
showOnTruncate = !alwaysShowTippyOnHover,
6+
alwaysShowTippyOnHover,
7+
// NOTE: if alwaysShowTippyOnHover is being passed by user don't apply truncation logic at all
8+
showOnTruncate = alwaysShowTippyOnHover === undefined,
89
wordBreak = true,
910
children: child,
1011
...rest

0 commit comments

Comments
 (0)