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

[EuiSelectable] Feature request to return single option value(s) on change/click #6485

Closed
1Copenut opened this issue Dec 15, 2022 · 0 comments · Fixed by #6487
Closed

[EuiSelectable] Feature request to return single option value(s) on change/click #6485

1Copenut opened this issue Dec 15, 2022 · 0 comments · Fixed by #6487

Comments

@1Copenut
Copy link
Contributor

Our EuiSelectable component currently returns two items:

  1. The options array with selected options
  2. React click/keyboard event

@constancecchen & @Heenawter identified a use case where having the text value of a clicked item would be beneficial. We are proposing adding a third returned string of the clicked/pressed text.

This return value can be derived currently using event.target.innerText but only works for click events, not keypress events. This is due to the click event moving focus, while the keypress event does not.

@cee-chen cee-chen changed the title [EuiSelectable] Feature request to return text value onClick() [EuiSelectable] Feature request to return single option value(s) on change/click Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant