react-tippy icon indicating copy to clipboard operation
react-tippy copied to clipboard

hideDelay not configurable

Open adambowles opened this issue 7 years ago • 10 comments

I set hideDelay={1000} and the tooltip is unloading instantly on mouseout event.

Setting delay={1000}, however, will set the show and hide delays to 1000ms

adambowles avatar Feb 01 '18 15:02 adambowles

I have the same problem. I want to set delay={3000} to show the tooltip after 3s, but keep the hide instantaneous. It could be amazing if we can configure delay & hideDelay separately.

pjosh avatar Feb 08 '18 13:02 pjosh

That is in fact the same as what I'm experiencing @pjosh

adambowles avatar Feb 08 '18 14:02 adambowles

Hey folks, how can get the instantaneous hide behavior? :)

Here's my setup for the wrapping component:

<Tooltip
        arrow
        unmountHTMLWhenHide
        position="right"
        size="small"
        animation="none"
        animateFill={false}
        transitionFlip={false}
        delay={0}
        hideDelay={0}
        distance={20}
        duration={0}
        hideDuration={0}
        {...this.props}
      />

animation and all possible delays and durations are set to 0, but tooltip still "hangs around" for 300-500ms after cursor goes away from the target area.

gothy avatar Feb 09 '18 16:02 gothy

Any update on that issue? hideDelay prop is basically useless right now

mandriv avatar May 24 '18 16:05 mandriv

@gothy only using duration={0} did the trick for me.

levindixon avatar May 29 '18 18:05 levindixon

I was able to set the hideDelay by passing in an array of numbers to delay. From the tippy.js docs:

delay: 0, // Number or Array [show, hide] e.g. [100, 500]

katrinalui avatar Jul 19 '18 21:07 katrinalui

Nice spot @katrinalui! That works for me

adambowles avatar Jul 23 '18 14:07 adambowles

@gothy Yeah, @levindixon's approach worked for me. The key is to NOT also add the animation attribute. If you include that attribute - even if it's set to none, it won't immediately show/hide. So, ONLY use duration={0} and you'll get the affect you want.

tbehunin avatar Aug 02 '18 21:08 tbehunin

Wow, this should be more obvious! How about no animation by default?

Kadrian avatar Apr 01 '19 17:04 Kadrian

@gothy Yeah, @levindixon's approach worked for me. The key is to NOT also add the animation attribute. If you include that attribute - even if it's set to none, it won't immediately show/hide. So, ONLY use duration={0} and you'll get the affect you want.

My hero !

NathanVss avatar Sep 22 '21 16:09 NathanVss