-
Notifications
You must be signed in to change notification settings - Fork 73
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
Issue with React Router v4 #89
Comments
Latest react still works with |
I believe it was this change that broke it. I.e. changing from using I don't know the case for sure, but should ReactDOM.createPortal be used rather than Will have to fork to fix this for my use case; if portal work I will create a PR here. |
@pocketjoso It's caused because it renders outside of the root, so yes you are correct, the router is not in the parent dom tree according to the tooltip. using the |
@Redmega Yeah using the portal api will work, I tested the basic functionality after making this minimal change: However I feel hesitant to do a PR for it, as some more code needs to be refactored. This is because the portal rendering now happens in the (react) Do you reckon you can push a fix for this instead? |
The portal api works but does not produce the same result as the current implementation. Currently a single tooltip is created for all the parents, where the portal api will create multiple tooltip, so it breaks the idea of a single tooltip moving. |
True. Is it more important to you to preserve that functionality than to allow the components to stay in the same react dom tree? I'm not sure going forward that these two separate goals will ever be possible for a single component to satisfy at the same time. So would be good to know what the stance is for this library, as this issue is a deal-breaker for us. |
I guess potentially it could be an option in the library, so the consumer could chose what is important to them, but it would make the code a bit heavier and more messy. |
I initially made this component exactly for this behavior of a single floating tooltip, so I would definitely keep it that way. I understand the lack of context is an issue and there should be a search for a fix if possible. I'm sorry if this means you'd have to migrate to another library, unfortunately I can't for now work on a fix, so I can't say when it will be fixed, if ever. |
I can fully understand you vision and you are right, keeping this as a simple tooltip is a good idea, I opened this issue and then asked myself but why it would do that?! 😄 And thank you for this library! |
Yeah thanks for explaining your position - it helps. And thanks as well for providing the library! 👍 |
Whenever I put
<Link>
inside the tooltip I get this error:You should not use <Link> outside a <Router>
Can you please tell how to fix the this?
The text was updated successfully, but these errors were encountered: