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
{{ message }}
Repository navigation
[EuiFlyout] Expose refs for EuiFlyoutHeader, EuiFlyoutFooter, and flyout outer scroll container #10087
Currently, EuiFlyoutHeader and EuiFlyoutFooter are plain FunctionComponents with no forwardRef and no named ref prop. This means there is no way to get the DOM node for the header or footer without querying the DOM (e.g., using .closest('.euiFlyoutHeader')).
Additionally, the outer scroll container (.euiFlyout__content), which receives overflow-y: auto via &:has(.euiFlyoutBody), has no exposed handle. Because of this, when trying to determine if an outer container can take a scroll event, we have to walk up the ancestor tree reading getComputedStyle(el).overflowY until we hit role="dialog".
Proposed Solution
Wrap EuiFlyoutHeader and EuiFlyoutFooter in forwardRef (or expose a named ref prop) to allow consumers to get direct references to their underlying DOM elements.
Expose a handle or ref for the outer scroll container (.euiFlyout__content) in EuiFlyout so consumers can interact with it without manually walking the ancestor tree.
Use Case
In Kibana, we have implemented a collapsible flyout header behavior. When scrolling the flyout body, the header collapses. To ensure the scroll experience is smooth when hovering over the non-scrollable header, we forward wheel events from the header to the flyout body.
However, because we cannot get a direct reference to the header DOM element or the flyout's outer scroll container, we've had to implement some workarounds that rely on DOM querying and walking the ancestor tree.
Value / Impact - Performance, developer ease-of-use
I’d be happy to implement this, following the EuiFlyoutBody ref precedent in #9373 . Are you already working on it, or would you welcome an external PR? @tsullivan
Activity
vianmangal commentedon Sep 30, 2026
I’d be happy to implement this, following the EuiFlyoutBody ref precedent in #9373 . Are you already working on it, or would you welcome an external PR? @tsullivan
tsullivan commentedon Sep 30, 2026
Hi @vianmangal - be my guest! You contribution is welcome.
vianmangal commentedon Sep 30, 2026
@tsullivan #10105
check it out
tsullivan commentedon Oct 1, 2026
Closed via #10105
[Flyout Template] Use EuiFlyoutHeader's forwarded ref instead of a cl…
[Flyout Template] Use EuiFlyoutHeader's forwarded ref instead of a cl…