-
Notifications
You must be signed in to change notification settings - Fork 88
Description
Is your feature request related to a problem? Please describe.
One of the responsibilities of the OuiPopover component is to correctly position itself relative to some other component. But positioning may need to be updated if the reference component moves (e.g. if it's in a srollable container). The repositionOnScroll property is intended to provide this functionality, but it only listens to scroll events on window currently.
Describe the solution you'd like
I'd like to update the implementation of repositionOnScroll to add scroll listeners for any parent nodes; alternatively, we may want to refactor the property so that it can actually take a particular node to bound listeners to as a value.
Describe alternatives you've considered
We could also expose the positionPopover method and allow developers to take ownership over position updates, but this seems like it would duplicate lots of functionality already built into OuiPopover (such as debouncing).
Additional context
An example limitation is described it opensearch-project/OpenSearch-Dashboards#2782