react-typeahead
react-typeahead copied to clipboard
Custom render TypeaheadOption children
I see there's a customListComponent
that will allow you to override the default implementation of how it renders and behaves, but this is a really heavyweight option if all I want to do is control how the individual options render.
In my particular case, I need to style an option differently if it's a certain value but I can't seem to do that unless I rewrite the whole customListComponent
.
I'd like to have a customOptionComponent
(or have the displayOption
prop be able to be a function with a node
return type) or something so I could conditionally render the options without having to duplicate your selector and option code or having to reimplement all that behavior.
Is this something that I'm already capable of and am not seeing it, or would this be added functionality? I'm happy to work to include this, if need be, and am open to implementation suggestions.