-
Notifications
You must be signed in to change notification settings - Fork 841
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
[EuiOutsideClickDetector] Accept standard event types #4422
Comments
EuiEvent is essentially internal to EuiOutsideClickDetector, is not having access to it creating an issue in TS with passing an event handler? |
It's not essential but I am just declaring the callback function elsewhere which needs the type. See elastic/kibana@587153d. I am fine leaving it that way but I just wanted to mention it. I also thought it was more widely used than just in |
I think we should define those props better, instead, to allow normally-typed event handlers to be passed through. There's some differences between mouse and touch events EUI would need to handle, but I feel that's better (and more accurate anyway) than having consumers rely on the EuiEvent type. Any thoughts on this @thompsongl ? |
I agree with your assessment that we should allow passing standard event types and have EuiOutsideClickDetector handle internally any type adjustments. |
Sounds good to me. Feel free to close or reword this issue. |
Some eui component events like
EuiOutsideClickDetector.onOutsideClick
, use theEuiEvent
but this type is not exported from@elastic/eui/src/components/outside_click_detector/outside_click_detector
.eui/src/components/outside_click_detector/outside_click_detector.ts
Line 39 in 5e4c3e2
Please add this to the top level exports. Thanks.
The text was updated successfully, but these errors were encountered: