-
Notifications
You must be signed in to change notification settings - Fork 177
Dropdown Menu: list item onSelect is fired sometimes during onClick of the trigger #305
Comments
Hmm! Thanks for raising this. We have a big PR on the way so I'll see if I can address it there |
Okay great to hear. Thanks! |
Hey @peduarte It looks like that PR was merged. Did anyone get the chance to address this? |
@kyle-platt I've had to take some time off, but pinging @benoitgrelard to assist. |
Hey @kyle-platt I've been trying to reproduce what you're seeing but haven't been able to. https://codesandbox.io/s/trusting-mirzakhani-qr58m?file=/src/App.js If you can fork this and somehow manage to reproduce your issue, that would be very helpful 🙏 |
Hey @benoitgrelard here's our component stripped down a bit. Happy to help on this. Let me know if you have any questions or concerns. https://codesandbox.io/s/radix-dropdown-example-gv28o |
A few thoughts:
We will soon have a |
@benoitgrelard thank you for the helpful insight. My apologies for the wrong repo. I also wasn't aware of the difference between a |
Hey @kyle-platt, we have been able to reproduce the issue in a simplified setup. Thanks for bringing this to our attention! 🙏 |
Sometimes when clicking the trigger to open the dropdown menu list, the onSelect of the 1st or 2nd item in the list is called. This updates the value selected and closes the list immediately.
Expected Result: A click on the trigger button should only open or close the menu list.
Current Outcome: Some clicks on the trigger button cause the onSelect of an item to be triggered.
Screen.Recording.2021-03-02.at.12.07.46.PM.mov
The text was updated successfully, but these errors were encountered: