Closed rek closed 6 years ago
Hi Adam! I can't reproduce this error. Are you sure you're rendering all the items specified in props.items
?
Hrmm strange, yeh I think everything is setup right. Did you make sure to keep the mouse cursor over the dropdown results when clearing the input text?
If you still have trouble, I will make a short screen cap.
Can this be reproduced with any of the examples on http://reactcommunity.org/react-autocomplete/?
Good point! No I cannot reproduce it there.
It must be to do with something in my setup. I am thinking now perhaps it is because we make the dropdown box smaller and add a scroll bar, as you alluded to. I will research more tomorrow.
Ok finally found it, we were missing an 'items' class in renderMenu.
So perhaps my suggested fix here is not right, but I do feel there is some place we could make a change to the lib so it crashes more gracefully.
Though I don't really have time to look into it, thanks for keeping this open so long, i'll close it now.
To trigger bug:
Type into the autocomplete field, when results appear, hover the mouse over the results. Then backspace to remove the text, and the following error appears:
This PR adds an easy check to mitigate that.