-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
What I needed in my app was when the screen height is not enough the menu list will pop up at the top of the controller. By researching, I figured out menuPosition=" fixed" is the answer.
As you may all know, when setting themenuPosition
prop to fixed, the menu will always be fixed on the screen. By scrolling the menu list will follow your screen.
However, in my app, I need it to fix with the control container not the screen. So I use some library call react-use to trigger some hook on scrolling. And I figure out somethings really weird and interesting. By adding useWindowScroll
hook to my component, and doing nothing, I can scroll while the menu list stays still.
Here is my code.
The first select component is used without useWindowScroll hook.
The second select component is used with useWindowScroll hook.
You can try can scroll it.
So I really not know what really happened here. So I create this issue to ask about this. And may someone need anything same with me can have a solution
Sorry for my bad English and thank you for a great library.