reactjs / react-autocomplete

WAI-ARIA compliant React autocomplete (combobox) component
MIT License
2.17k stars 532 forks source link

Is it possible to have a label and a value? #267

Closed psyanite closed 7 years ago

psyanite commented 7 years ago

For example, I would like to display a list of Areas, [ { label: "Kansas", value: "1" }, { label: "Texas", value: "2" } ]

Sorry, if I've missed this from the documentation :(

Thank you for taking the time to read my question :)

CMTegner commented 7 years ago

Hi! Did you figure it out on your own?

psyanite commented 7 years ago

Hey @CMTegner, that's probably one of the fastest responses I've seen on Github so far. I love this project.

Turns out I was just being a dummy. I figured it out by passing an object with three properties, namely kind, name, and value, and displaying only name.

Thanks for responding even though I closed the issue.

CMTegner commented 7 years ago

Great, glad you figured it out :)