yury-dymov / react-autocomplete-input

Autocomplete input field for React
https://yury-dymov.github.io/react-autocomplete-input/
MIT License
199 stars 65 forks source link

fix error @undefined in the text when pressing enter with selector ou… #16

Closed kafeltz closed 6 years ago

kafeltz commented 6 years ago

…tside its bound

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 97.009% when pulling 08e38f6c460de2ff2f7b8d8b584dd44f92f9882c on kafeltz:master into 316448a9da284d8b0a93cdf4a7ede2777d492ed6 on yury-dymov:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 97.009% when pulling aba6c5be21581b7559a0137d9e5542aa9b583cd3 on kafeltz:master into 316448a9da284d8b0a93cdf4a7ede2777d492ed6 on yury-dymov:master.

yury-dymov commented 6 years ago

I would probably compare index with array length but maybe your solution is better (in case we still have at least one element in the list). I will have a more precise look either tonight or tomorrow. Super busy at work now :/

yury-dymov commented 6 years ago

Above was written non-sense, lol :) I've added a couple lines of code, which might be over-defensive but they make me more comfortable, also a couple of tests. Publishing to npm soon