Skip to content
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

Can't use EuiContextMenuItem's onClick event param in TS #2265

Closed
jloleysens opened this issue Aug 28, 2019 · 1 comment
Closed

Can't use EuiContextMenuItem's onClick event param in TS #2265

jloleysens opened this issue Aug 28, 2019 · 1 comment

Comments

@jloleysens
Copy link

jloleysens commented Aug 28, 2019

Summary

When using EuiContextMenuItem's onClick property in TS I can only pass in a function without any params () => {...} the following error is reported when trying to use the event param:

Screenshot 2019-08-28 at 13 26 01

It looks like the intersection types don't permit the use of the component per the following:

Screenshot 2019-08-28 at 13 25 34

I'm pretty sure React.MouseEvent is the one we want. I might just be doing something wrong or this may also have been fixed.

Working around this atm by as anying my callback.

Additional Infos

Version: 13.1.1
Component: EuiContextMenuItem.

@thompsongl
Copy link
Contributor

Looks like this was fixed by #2212 (https://github.com/elastic/eui/pull/2212/files#diff-235909b173f9440889622399eddbca4eR26), which was released in 13.7.0 (but you might want to wait for 13.7.1 as we introduced a regression)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants