-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
Dynamic Content while tooltip still open #231
Comments
I too was looking for this functionality. In my case, state was changed when you clicked the button and I wanted the tooltip content to update. Best I could do for now was to close the tooltip on click... not sure if this could be helpful for you. Ex:
|
So there is no way to refresh the content of the tooltip once it's displayed? I have dynamic content inside, it's fetch while the tooltip open, and I need to update what's displayed inside once it's done. |
I had the same problem here. But found a solution: I added the static method
Works like a charm. Does not even need @BradRyan 's suggestion. |
Here is hacker'ish solution: Close to ideal way would be to pass currentTarget to getContent function. |
I couldnt get ReactTooltip.rebuild() to work in the setState callback, so i did
When you add a random key the tooltip is gone and it forces you to hover again to show the new tooltip, not ideal, but i couldnt make anything else to work. |
Having the same issue with checkbox inside the react-tooltip. Why this PR(#281) is not being merged? |
You have to add getContent to the ReactTooltip.
copyMessage is the function that returns the message dynamically. |
I had an issue where it was not appearing on a dynamically generated react component. I solved it similarly to @jeanmichelcote: Just had to rebuild the tooltips on first mounting the component.
|
For anyone that still looks for a solution: there is no built in option to use dynamic content while the tooltip is still open. Here is a working example for me:
|
Hi,
I'm currently using the getContent prop to send in dynamic content whenever the tooltip is shown. However, is there a way to have the content be updated while the tooltip is still open? (Ex. let's say I want to add a class to a certain html element in the tooltip when a user clicks a checkbox) Currently it's only updated when the tooltip event is triggered after it's hidden.
The text was updated successfully, but these errors were encountered: