react-typeahead icon indicating copy to clipboard operation
react-typeahead copied to clipboard

Add clearSelectionIndex method

Open wolfd opened this issue 9 years ago • 2 comments

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.

wolfd avatar May 16 '16 14:05 wolfd

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.

wolfd avatar May 16 '16 21:05 wolfd

I also realized that you can use a ref and setState outside the component to do this. It's not great, but it works.

wolfd avatar May 23 '16 18:05 wolfd