nandorojo / moti

🐼 The React Native (+ Web) animation library, powered by Reanimated 3.
https://moti.fyi
MIT License
3.9k stars 120 forks source link

How can I implement a Select or Dropdown component? #320

Open duochizhacai opened 8 months ago

duochizhacai commented 8 months ago

Is there an existing issue for this?

Do you want this issue prioritized?

Current Behavior

I'm very curious, through moti on the web, how should I implement a Select component, and how should I determine if it clicks on an element outside the component? Does moti support the global document.click event? By the way, I found that in the warehouse This example seems to be unavailable.https://github.com/nandorojo/moti/blob/master/docs/docs/examples/dropdown.md When hovering to dropdown, the entire dropdown disappears. Do you know why?

Expected Behavior

No response

Steps To Reproduce

No response

Versions

- Moti: 0.26.0
- Reanimated: 3.5.4
- React Native: 0.72.6

Screenshots

No response

Reproduction

https://github.com/nandorojo/moti/assets/58379214/ae7cf8a4-9db6-4631-8fee-6c0339ebcd09