fmoo / react-typeahead

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

Allow displayOption function to return an element #149

Open vilppuvuorinen opened 8 years ago

vilppuvuorinen commented 8 years ago

Relatively small changes to allow using custom element via displayOption prop inside the result list. The entire element will still be rendered inside <a href="#"> ... </a>, but otherwise anything goes. Additionally, displayOption could no longer generate a string representation of the given option object without help. Summary of changes:

Unit tests are included.

vilppuvuorinen commented 8 years ago

Looks like there is also a bit more invasive alternative #152.

gregeinfrank commented 8 years ago

@fmoo any plans to support this?