File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/coreui-react/src/components/tooltip Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export const CTooltip = forwardRef<HTMLDivElement, CTooltipProps>(
9494 const forkedRef = useForkedRef ( ref , tooltipRef )
9595 const uID = useRef ( `tooltip${ Math . floor ( Math . random ( ) * 1_000_000 ) } ` )
9696
97- const { initPopper, destroyPopper } = usePopper ( )
97+ const { initPopper, destroyPopper, updatePopper } = usePopper ( )
9898 const [ mounted , setMounted ] = useState ( false )
9999 const [ _visible , setVisible ] = useState ( visible )
100100
@@ -162,6 +162,10 @@ export const CTooltip = forwardRef<HTMLDivElement, CTooltipProps>(
162162 }
163163 } , [ _visible ] )
164164
165+ useEffect ( ( ) => {
166+ updatePopper ( )
167+ } , [ content ] )
168+
165169 return (
166170 < >
167171 { React . cloneElement ( children as React . ReactElement < any > , {
You can’t perform that action at this time.
0 commit comments