Skip to content

How could I return name of select, when im clearing last selected item in multi-select? #4856

Answered by Rall3n
fed8055 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @fed8055,

the name prop is part of the second argument received by the onChange prop.
You can easily access it as follows:

<Select
  name="test"
  onChange={(value, meta) => {
    let name = meta.name;
  }}
/>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fed8055
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants