Skip to content

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

Closed

Description

@1Copenut

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions