eui icon indicating copy to clipboard operation
eui copied to clipboard

[EuiResizableContainer] Add support for `onResizeStart` and `onResizeEnd` callback props

Open davismcphee opened this issue 3 years ago • 2 comments

While implementing a resizable layout in Discover using EuiResizableContainer, we ran into some conflicts with react-reverse-portal. We were able to implement a workaround, but it involved setting up our own event listeners to watch for when resizing starts and ends.

It would simplify our use case a lot, and would probably be generally useful, if EuiResizableContainer accepted callback props for onResizeStart and onResizeEnd that would allow consumers to easily listen for when resizing starts and ends.

For our use case it's only important to listen for resizing triggered by a mouse click, but it might be worth considering whether these callbacks would apply to keyboard based resizing as well.

davismcphee avatar Sep 09 '22 14:09 davismcphee

This definitely seems like a reasonable ask! We might want to look into adding support for EuiResizablePanel as well at the same time.

@davismcphee would someone on your team be open to opening a PR for EUI with this addition? The EUI team is currently fairly busy with the Emotion conversion, and this feels like a good first issue for another team to take on/help out with.

cee-chen avatar Sep 09 '22 17:09 cee-chen

@constancecchen Definitely! I'll assign it to myself and work on it since I'll be needing it soonest anyways.

davismcphee avatar Sep 09 '22 19:09 davismcphee