Skip to content

[EuiSelectable] EuiSelectable's onChange prop not passing a full event back on React v16#6026

Merged
cee-chen merged 2 commits intoelastic:mainfrom
cee-chen:euiselectable-onchange-event
Jul 5, 2022
Merged

[EuiSelectable] EuiSelectable's onChange prop not passing a full event back on React v16#6026
cee-chen merged 2 commits intoelastic:mainfrom
cee-chen:euiselectable-onchange-event

Conversation

@cee-chen
Copy link
Copy Markdown
Contributor

@cee-chen cee-chen commented Jul 5, 2022

Summary

@jeramysoucy alerted us that the 2nd event arg on EuiSelectable's onChange callback (added in #5926) is not working in Kibana. This is due to Kibana being on React v16 and EUI being on React v17 (see https://reactjs.org/docs/legacy-event-pooling.html).

I tested a built version of this branch against local Kibana and can confirm event types, shiftKey, nativeEvent data etc. are now correctly coming through:

Checklist

  • yarn build-pack Kibana test
  • A changelog entry exists and is marked appropriately

@cee-chen cee-chen requested a review from chandlerprall July 5, 2022 17:39
@cee-chen cee-chen mentioned this pull request Jul 5, 2022
2 tasks
Copy link
Copy Markdown
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @constancecchen!

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_6026/

@cee-chen cee-chen enabled auto-merge (squash) July 5, 2022 18:19
@cee-chen cee-chen merged commit f27d951 into elastic:main Jul 5, 2022
@cee-chen cee-chen deleted the euiselectable-onchange-event branch July 5, 2022 18:30
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

Successfully merging this pull request may close these issues.

4 participants