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.
Our
EuiSelectablecomponent currently returns two items:optionsarray 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.innerTextbut only works for click events, not keypress events. This is due to the click event moving focus, while the keypress event does not.