Open wolfd opened 8 years ago
Also, @fmoo, what do you think adding a prop that allows you to map any key to any action?
There are a few locations that I've wanted to customize the behavior of the plugin's keybindings (making the tab key not necessarily select an option, but only move down the list, and a few others.) I would rather make react-typeahead extremely flexible and generalized so it can meet the needs of all sorts of users.
I also realized that you can use a ref and setState
outside the component to do this. It's not great, but it works.
Adds
clearSelection
method so calling_onEscape
is not necessary to clear selectionIndex.I had a need to clear the selection index, and unless I'm not seeing something, I only found the
_onEscape
method to be able to do that.Also added short blurb on the
setEntryText
method to README.md.