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

Closed
pickhardt opened this issue Aug 27, 2024 · 4 comments
Labels
Bug Stale This has not seen activity in quite some time

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 from amir1387aht 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.

Copy link

github-actions bot commented Dec 2, 2024

This issue is stale because it has not seen activity in 30 days. Remove the stale label or comment within 14 days, or it will be closed.

@github-actions github-actions bot added the Stale This has not seen activity in quite some time label Dec 2, 2024
@github-actions github-actions bot closed this as completed Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Stale This has not seen activity in quite some time
Projects
None yet
Development

No branches or pull requests

2 participants