I am attaching a Popover to a button on my menu bar. I want the Popover to be hidden when it is no longer in the Viewport when scrolled up, but it is scrolled down as well. I have tried using z-indexes on other elements overlaying it but it doesn't work.
Affected component/components
Popover
How to reproduce
1) Create button in navigation
2) Click button to show Popover
3) When scroll, Popover is not in Viewport but it always show
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Google
Before submitting
[X] I've made research efforts and searched the documentation
setting open to false will automatically close it too , throw current Y position and dimensions in an effect and de-render when popover dimensiosn - viewport
Describe the bug
I am attaching a Popover to a button on my menu bar. I want the Popover to be hidden when it is no longer in the Viewport when scrolled up, but it is scrolled down as well. I have tried using z-indexes on other elements overlaying it but it doesn't work.
Affected component/components
Popover
How to reproduce
1) Create button in navigation 2) Click button to show Popover 3) When scroll, Popover is not in Viewport but it always show
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting