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

option to not prevent key events #111

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

Conversation

magalhas
Copy link

Related to #110. Created a new prop to enable/disable keyDown default prevention. In my case having it as false works great so when a user tabs the field gets populated with the first visible option and it jumps right to the next field.

@@ -66,6 +67,7 @@ var Typeahead = React.createClass({
placeholder: "",
textarea: false,
inputProps: {},
preventKeyEvents: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be named awkwardly. The name suggests that setting it to true will prevent key events. Perhaps this should be renamed to propagateKeyEvents and default to false? Then the code in _onKeyDown would be

  if (!this.props.propagateKeyEvents) {
    event.preventDefault();
  }

@thehuey
Copy link
Contributor

thehuey commented Aug 16, 2015

Otherwise looks good.

@bekerov
Copy link

bekerov commented Mar 10, 2016

How about merge ?

@magalhas
Copy link
Author

That would be awesome. Nothing against changing the name of the property.

@arahansen
Copy link

I would really like to be able to use this feature. Any chance of getting it merged?

If we are waiting until we can get an update on the naming convention, I could submit an update to the naming convention.

@fmoo
Copy link
Owner

fmoo commented Mar 25, 2016

@arahansen I'll pick this up if someone sends me a PR with an updated README.md and a unittest.

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.

5 participants