fmoo / react-typeahead

Pure react-based typeahead and typeahead-tokenizer
ISC License
677 stars 231 forks source link

Get options array from TypeaheadSelector? #139

Open juanmnl opened 8 years ago

juanmnl commented 8 years ago

Is there a simple way of getting the options array from the TypeaheadSelector sub-component (the results that print in the dropdown), so i can use them and filter another view?
Sure I'm missing something in the docs

trshafer commented 8 years ago

Hey @juanmnl , there is not currently an official way. It's stored in state.visible. Technically it's available via this.refs.Typeahead.state.visible, assuming your component has ref Typeahead. But I wouldn't recommend that. I'd accept a pull request that exposes state.visible in a component function.