fmoo / react-typeahead

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

Ability to pass custom prop to customListComponent #182

Closed localjo closed 7 years ago

localjo commented 8 years ago

We want the ability to pass an href value along with the options into our customListComponent. The idea is to make the options that display directly clickable. I was able to achieve this by adding a rider object inside the customClasses prop;

customClasses={{menuItems: props.items, input: 'context-menu__search'}}

This works, without warnings, but it would be nice if there was either a prop like customData that could be used to pass in objects like this, or if the options prop supported more than just an array of strings.

I'm mostly worried that, since my approach is a bit of a hack of the customClasses prop, that it might break in future minor versions.

jigar1101 commented 5 years ago

@localjo Did you find a way to pass props to customListComponent?