You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
I think my issue (#1184) duplicates this one. But I did a PR with the fix 1.5 years ago (#1185). Maybe in another 1.5 years this comment will be useful to someone else
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). TherepositionOnScroll
property is intended to provide this functionality, but it only listens toscroll
events onwindow
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 intoOuiPopover
(such as debouncing).Additional context
An example limitation is described it opensearch-project/OpenSearch-Dashboards#2782
Screen.Recording.2022-11-04.at.11.58.45.AM.mov
The text was updated successfully, but these errors were encountered: