stackbuilders / react-native-spotlight-tour

A highly customizable tour feature with an awesome spotlight effect
https://stackbuilders.github.io/react-native-spotlight-tour/
MIT License
236 stars 27 forks source link

Question: How to display arrow #139

Open ntxl1210 opened 9 months ago

ntxl1210 commented 9 months ago

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 commented 8 months ago

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! 🙂