-
-
Notifications
You must be signed in to change notification settings - Fork 533
[BUG] Element with id 'react-tooltip-base-styles' already exists #1185
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
Hi any news? |
Sorry, haven't had the time yet to investigate this further. |
Sorry for the delay on getting back to this. @AYColumbia I tried reproducing the warning with the repo you provided here, but it doesn't happen for me, and the tooltip works normally. Could you provide some more info on this? I'll be able to follow up more promptly now. @tonyco97 can you provide some info on how you've experienced this issue? Can you try cloning @AYColumbia's repo and seeing if it happens there for you as well? Here's the repo: https://github.com/AYColumbia/test-tooltip-app Running |
Any solutions to resolve this? I'm having the same issue with My project is using react-tooltip, and I have another package that's also using react-tooltip. And I think both of them are trying to inject the react-tooltip base and core style into the html, which causes this warning in console. I'm seeing 1000+ of them in my console, which is really annoying. Any suggestions? |
@Ti-tanium try using |
Is there a way to disable the injection globally for react-tooltip? Adding the |
There's a way described on the docs with environment variables, but that's deprecated. I suggest writing a simple wrapper that sets
We use that as a warning we might be doing something wrong with style injection. We might need to revise the logic, since we hadn't considered your use case, in which you use a package that also uses the tooltip internally.
As you can see on the code, we only check for the |
Hi, I tried some different adjustments the test project but have been unable to reproduce as well. It does still happen with my actual project though so will have to read through the new posts and see if there's anything else I can try. The only thing I can think of is that I may have missed a package that's also loading tooltip that is in my actual project but NOT in the test project. I tried to run that down but haven't found anything yet. |
I' ve tried test-tooltip-app and the error does not appear here. In my case, i've a page with react-tooltip which imports a component also containing react tooltip. I've also tried to use |
I updated my project with multiple components that use react-tooltip and still can't duplicate the issue. It's bewildering. |
Try to apply some style to both tooltip in both project, one in your project and the in other one in the component that you import in the first one |
We might just remove the warning, since it doesn't seem to help much here. @tonyco97 please try the beta release The warning should be completely gone with that version. If we merge it, I'll let you know when we push an official release, and close this issue. |
Thanks for the tip. I tried what you recommend but still no warnings. I pushed all the changes to the repo so feel free to grab it with those changes and see if I missed anything you would and try it and let us know. It may be moot at this point since it looks like the warnings are to be removed. |
I applied the beta release to my actual project to test it and the warnings are gone. I'll just revert back until you do an official release. Thanks much. |
Official release with the fix |
Discussed in #1184
Check the discussion for more info.
The text was updated successfully, but these errors were encountered: