sickdyd / react-search-autocomplete

A search box that filters the provided array of objects
https://sickdyd.github.io/react-search-autocomplete
MIT License
222 stars 85 forks source link

blur event should close dropdown #106

Closed lkretzschmar closed 1 year ago

lkretzschmar commented 1 year ago

When I type something in the inputbox, teh dropdown appears. If I then Tab to the next element, the dropdown does not close.

This is reproducible on the demo page:

  1. Go to https://sickdyd.github.io/react-search-autocomplete/
  2. Click on the square input box by the Titanic prompt.
  3. Type abc
  4. See dropdown appear
  5. Press Tab key
  6. See dropdown stay open

Expected behavior Expect dropdown to close when input field loses focus.

sickdyd commented 1 year ago

@lkretzschmar Fixed in the latest version!