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

Question: How to display arrow #139

Open
ntxl1210 opened this issue Feb 6, 2024 · 1 comment
Open

Question: How to display arrow #139

ntxl1210 opened this issue Feb 6, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ntxl1210
Copy link

ntxl1210 commented Feb 6, 2024

I created a ref and added it into floatingProps middleware but the arrow didn't display.
Here is my code:
const arrowRef = useRef(null);
...
floatingProps={{
middleware: [
offset(4),
shift({
padding: 10,
}),
flip(),
arrow({ element: arrowRef }),
],
placement: 'bottom',
}}
...

@JoseLion
Copy link
Member

I'm sorry for not getting back to you sooner. I gave it a try, and I can see the problem. With the current implementation, there's no way to get the arrow's x and y positions. We'll need to change the approach of the middleware prop a bit. I'll be working on this next so we can provide a solution in the next release. Thanks for the report! 🙂

@JoseLion JoseLion self-assigned this Mar 27, 2024
@JoseLion JoseLion added bug Something isn't working enhancement New feature or request and removed enhancement New feature or request labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants