-
-
Notifications
You must be signed in to change notification settings - Fork 533
v5 without v4 .rebuild() #863
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
Comments
Do you mind building a By the way, I've just realized some sections in the documentation say that Also, this line doesn't do anything, since this isn't the way an anchor element is attached to a tooltip anymore. componentNode.setAttribute("data-for", "tooltip"); |
Thanks for the last observation. I'm working with svg icons where i only get the X and Y when i handle with mouse hover. |
Are you referring to the v4 https://reacttooltip.github.io/react-tooltip/ Unfortunately, v5 launched without the We also accept contributions, if you'd be willing to help out. #861 already has the basics of how we're planning on doing it. |
No, effect is ok on my side. It works with solid or float. |
Then I don't quite understand. The StackOverflow question doesn't seem related to what you described. It would really help if you could post some sample code of what you're trying to do with v5, or at least a working example with v4, so I can understand what you're trying to accomplish. |
Working example with v4 is on my first post.
excerpt of code from the function that build dynamic x and y with the JS element created on that moment:
With this way on v4 react tooltip is working fine on my side. |
Hi @ivansilvestre, I believe what @gabrieljablonski asked, is a live example and I agree. Can you please create a simple example on https://codesandbox.io/ that reflects what you want, please? I read the comments and I believe you're thinking about v4 .rebuild(), but the .rebuild() only triggers a re-render of react-tooltip in v4 (basically a workaround), this is because of the old and obsolete code that v4 was built (in the past, was a very nice code). In v5 we don't need to trigger the re-render manually, we have the watchers in |
I think the problem may be related to that, because now you are using react hooks. |
v5.2.0 fixes this, the tooltip is not shown when
This doesn't seem like it would help much.
For sure then. If you'd like to migrate to v5 in the future, try preparing a demo that you'd be allowed to share, or at least a video so we can understand exactly your use case. |
Uh oh!
There was an error while loading. Please reload this page.
Basically I'm using a library, react-svg-pan-zoom, that places svg depending on the dynamic coordinates we give.
In this case, the v4 .rebuild() was to place the tooltip under the coordinates that it gave when hovering over the specific svg icon.
At the moment, with v5 the tooltip is updating the hover data but the tooltip box appears outside the svg icon and is always on screen, it doesn't just appear on the hover as before with v4.
Is there any way to trigger the tooltip like .rebuild() in v4?
v4:
To insert Dynamic tooltip:
React component:
v5:
The text was updated successfully, but these errors were encountered: