Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clearSelectionIndex method #193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wolfd
Copy link
Contributor

@wolfd wolfd commented May 16, 2016

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
Copy link
Contributor Author

wolfd commented May 16, 2016

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
Copy link
Contributor Author

wolfd commented May 23, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant