-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EuiResizeObserver; Allow dynamic content height in EuiContextMenuPanel #1559
Conversation
I feel |
This is a good idea. I was weighing options for the return value and initially settled on a "give them everything" approach. After adding the docs, though, it felt odd with the MutationObserver fallback. |
@chandlerprall updated the response object to be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; tested resize observer docs locally in all Chrome, FF, Safari, Edge, & IE11.
Summary
EuiResizeObserver
component as an optimized path toward more efficient component resize eventing.EuiObserver
component that handlesref
and lifecycle management required by bothEuiResizeObserver
andEuiMutationObserver
.MutationObserver
in browsers that don't (yet) support theResizeObserver
API. Only Chrome and Opera currently have support.EuiResizeObserver
inEuiContextMenuPanel
EuiContextMenuPanel
has existingupdateHeight
logic, but only accounted for parent state changes. Internal content changes now register height adjustments.Checklist
- [ ] This was checked in dark mode- [ ] This was checked against keyboard-only and screenreader scenarios- [ ] This required updates to Framer X components