Closed dtaub closed 3 years ago
Greetings @dtaub,
Given that this appears to be an implementation question and not a library issue, I will convert this to a discussion.
To answer your question, the focusedOption is now being returned to the MenuList component as a prop as of version 4.3.
Do you have a codesandbox that can be looked at for troubleshooting?
Hey, first of all obligatory thanks for all the work on this component.
I implemented a custom
MenuList
component in order to support virtual scrolling (using react-virtuoso). Something I noticed, however, is that when using the arrow keys to change the selected option in the menu, the menu no longer scrolls the selected option into view. This is understandable given the scrollable container is custom so I was trying to reimplement the behavior of scrolling the focused option into view, but I can't find any event or any way to know that.I expected there would be some event for when the focused option changed but I don't see one. Digging through the code a bit, I don't see any event getting fired when the focused option changes either. Is there a way to listen for the focused option that I'm missing?