reactjs / react-autocomplete

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

autoHighlight no longer working on Async list. #249

Closed sinbonders closed 7 years ago

sinbonders commented 7 years ago

As of 1.5.7, the functionality where the first matching item is selected in the list has stopped working the same way for Async-type lists. This can be tested on https://reactcommunity.org/react-autocomplete/async-data/ If you type Col into the autocomplete, it will find Colorado, but will no longer auto-highlight it.

However, if after the list is filtered, you continue with Colo, it will select Colorado.

I think the recent simplification of the autoHighlight broke this behavior.

I found this because the majority of my E2E tests relied on just being able to hit Enter to select the top item. I'm version-locked now until I rewrite all my tests to click the first item manually...

CMTegner commented 7 years ago

Hi! Thanks for bringing this to our attention! I was expecting there to be some fallout from the changes that were made two days ago, so I'm really happy that your tests picked this up. I've added the missing test to ensure this doesn't regress in the future. 1.5.8 should be working as expected.

Let me know if you find any other discrepancies in relation to before the changes were made.