You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our EuiSelectable component currently returns two items:
The options array with selected options
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.
The text was updated successfully, but these errors were encountered:
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
Our
EuiSelectable
component currently returns two items:options
array with selected options@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.The text was updated successfully, but these errors were encountered: