Skip to content

Conversation

vilppuvuorinen
Copy link

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:

  • Option allows elements as children
  • Typeahead's _onOptionSelected converts optionString into a string toString if given value is not a string

Unit tests are included.

* Option allows elements as children
* Typeahead's _onOptionSelected converts optionString into a string using toString if given value is not a string
@vilppuvuorinen
Copy link
Author

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

@gregeinfrank
Copy link
Contributor

@fmoo any plans to support this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants