reactjs / react-autocomplete

WAI-ARIA compliant React autocomplete (combobox) component
MIT License
2.17k stars 532 forks source link

[fixed] #309 - autoHighlight not working unless match is beginning of… #310

Closed epegzz closed 6 years ago

epegzz commented 6 years ago

See #309

The current implementation only auto-highlights an item if the input matches the beginning of the item label.

That's problematic if your shouldItemRender implementation allows matching anywhere in the item label, not just from the start.

This PR fixes that.

CMTegner commented 6 years ago

The existing logic won't be changed at the moment. See #239 for explanation.