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

Placement is not working properly in tables #167

Open
phibersoft opened this issue Apr 16, 2023 · 6 comments
Open

Placement is not working properly in tables #167

phibersoft opened this issue Apr 16, 2023 · 6 comments

Comments

@phibersoft
Copy link

phibersoft commented Apr 16, 2023

Describe the bug
I'm passing "top" as prop, but its returning and showing on "bottom". I tested on codesandbox with your official demo, it looks like working good, but in my app its not working. The only difference is im using this tooltip in table header, maybe its related to this.

Reproduce
Check codesandbox link: https://codesandbox.io/s/ancient-bush-exyt8r?file=/src/index.js

Screenshots
image

Additional Context
Placement is working fine on left-right-bottom. Its only occuring on top.

@mohsinulhaq
Copy link
Owner

Could you please share a codesandbox reproducer with that table header usage?

@phibersoft
Copy link
Author

@happylolonly
Copy link

happylolonly commented Jul 11, 2023

It is not enough space for top, also thinking how to fix it. Strange why it is changing to bottom if it is absolute.
@mohsinulhaq maybe you can help?

@phibersoft
Copy link
Author

Its not the solution but i solved like this:

Create an empty div before table, set width 100%

<div id='tooltip-bar' style={{ width: '100%' }} />
<table ...

And in the header cells, use createPortal and teleport your component to #tooltip-bar. In this way it works normally and looks fine.

@happylolonly
Copy link

happylolonly commented Jul 11, 2023

oh... 😅

found that this issue not depend on this lib, floating-ui/react-popper#383

@phibersoft
Copy link
Author

Ah okay, thanks for informing 😃

Repository owner deleted a comment from BhavyClover Jan 2, 2024
Repository owner deleted a comment from BhavyClover Feb 22, 2024
Repository owner deleted a comment from BhavyClover Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants