fmoo / react-typeahead

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

display a message if the results list is truncated #196

Closed zdhickman closed 8 years ago

zdhickman commented 8 years ago

Problem

If more than maxVisible results are specified, options matching the entryValue are truncated without any message. This can be misleading to a user who does not know about the internals of the dropdown.

New Prop: resultsTruncatedMessage

If specified, resultsTruncatedMessage is displayed at the bottom of the results dropdown when more than maxVisible results are returned after filtering.

Example with styling:

Also includes a new key for customClasses, resultsTruncated

fmoo commented 8 years ago

Oops, I merged before I realized; any chance you could put up another PR to add this to the tokenizer also? (instead of just typeahead? It's just a wrapper, so it's just a matter of passing the extra property down)

zdhickman commented 8 years ago

Sure thing.