-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: ReactTooltip.show() #47
Comments
Now the react-tooltip doesn't support |
In addition to that, it would be nice if we could choose the way it's triggered - on hover, click or event. |
Thanks @Sly777 |
Did this fix the original issue with ReactTooltip.show()? It seems like the .show() method is still missing to me. |
I didn't build the |
Thanks for confirming. |
how can I trigger custom event? For example: <a data-event='specialhat' data-tip='tooltip'></a> How to trigger such event? |
Behind |
ah I see. so in case I want to display error tool tip when user input invalid data, what's the best way to trigger it in this case? It can not be 'click', because it's an input type text. users click it at the beginning. |
@craigcosmo Looks there's no way to satisfy your requirement at the moment, you may need a static method like |
@craigcosmo : Were you able to implement show method? Just wanted to check before i give it a try. |
Not yet, if you do, please notify once you got. Im also interested On Thu, Jun 16, 2016 at 2:29 AM +0700, "Ranjith Nair" notifications@github.com wrote: @craigcosmo : Were you able to implement show method? Just wanted to check before i give it a try. @wwayne : Is this something which is still in your radar? — |
No, I don't have any plan on this at the moment. It's not that easy to implement this feature, much less we should have to consider if the user want to show multi tooltip at the same time. |
this show() feature would be very useful to highlight icons / locations on a google map. Please let me know how you get on. |
This has been supported since
|
thank you so much for making this! |
it shows _XflowTooltip2.default.show is not a function. |
@DeepanshuTaneja No idea why you got _XflowTooltip2, but I didn't find |
thank you! |
@wwayne Thanks for creating the library! I have a question about your example to use
I tried to use I also looked at the source code, and it seems that the way it works is to create an event by (https://github.com/wwayne/react-tooltip/blob/master/src/decorators/staticMethods.js#L15):
However, I tried it out and the function All I'm trying to figure out is how to use |
@mymywang Just ran into this. You can use this for
Not sure if I did something wrong though, but I had to set |
@ZDTaylor Thanks. I tried it but typescript complains that the input passed into |
I had to do the following to stop from TS complaining: const toolTipRef = useRef(null);
useEffect(() => {
ReactTooltip.show((toolTipRef?.current as unknown) as Element);
}); |
@tim-phillips could you include what you put in the ReactTooltip component too? |
I was able to get it working like this using functional components and typescript. |
I have an important tooltip that I want to show programmatically. I could then set a timeout and ReactTooltip.hide() it .. Best if the hover would prevent it from being hidden.
Do you have an example for this? Should I try to capture an event and pass it to ReactTooltip.showTooltip (e) ?
The text was updated successfully, but these errors were encountered: