I'm using the Material UI autocomplete in react and it's working fine.
However, I can't figure out how to get the object of the selected item. Ex I want to search for a person and then add that item to an array of objects, and into a table. The person object including name, email and so on.
And I can't seem to find any examples of this.
My code looks like this: My code
I trying: https://material-ui.com/components/autocomplete/
Does anyone have an Idé on how to do this? I'm pretty new to react.
1 Answer 1
You can use onChange property of Autocomplete and find object by id in the array of options.
1 Comment
Explore related questions
See similar questions with these tags.