Skip to content
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

[BUG] Position not correct alongside react-window / react-virtualized-auto-sizer #1222

Open
pickhardt opened this issue Aug 27, 2024 · 3 comments
Labels

Comments

@pickhardt
Copy link

Bug description

I had some code that was working correctly with react-tooltip, and a few hundred items. I then used react-window and react-virtualized-auto-sizer but now the tooltips show up in the top left corner of the webpage. They are not getting the top / left offsets applied correctly. Here's what I added:
import { FixedSizeGrid } from 'react-window';
import AutoSizer from 'react-virtualized-auto-sizer';

I double checked my code and don't think it's a bug on my end. I even tried changing the anchorSelect to use unique ids but that didn't help.

Version of Package
5.26.4

To Reproduce
import { FixedSizeGrid } from 'react-window';
import AutoSizer from 'react-virtualized-auto-sizer';
Then implement an AutoSizer followed by a child FixedSizeGrid with divs that have a tooltip.

Expected behavior
Tooltip should show up right above the elements, not in the top left corner.

@pickhardt pickhardt added the Bug label Aug 27, 2024
@ReactTooltip ReactTooltip deleted a comment Aug 27, 2024
@ReactTooltip ReactTooltip deleted a comment Aug 27, 2024
@gabrieljablonski
Copy link
Member

@pickhardt

Hopefully you didn't click any links, spam bots now even on GitHub...

Opened the issue to clean it up, I'll try to get to your question later.

@pickhardt
Copy link
Author

No worries, I didn't click the link. I will investigate more myself tomorrow too. I think it isn't a bug on my end. Still, I want to try some things, try more workarounds, see if I can figure it out.

@gabrieljablonski
Copy link
Member

Sorry for the delay.

Can you try using a react portal to render the tooltip?

As explained on this comment on #1163

Here's the sample code:

https://stackblitz.com/edit/stackblitz-starters-t2j9yh?file=src%2FApp.tsx


If that doesn't help, can you try to provide a sample project reproducing the problem? It would help a lot in debugging the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants