-
Notifications
You must be signed in to change notification settings - Fork 829
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
Comments
Looks like this was fixed by #2212 (https://github.com/elastic/eui/pull/2212/files#diff-235909b173f9440889622399eddbca4eR26), which was released in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:It looks like the intersection types don't permit the use of the component per the following:
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 any
ing my callback.Additional Infos
Version:
13.1.1
Component:
EuiContextMenuItem
.The text was updated successfully, but these errors were encountered: