-
Notifications
You must be signed in to change notification settings - Fork 229
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
base: master
Are you sure you want to change the base?
Conversation
@@ -66,6 +67,7 @@ var Typeahead = React.createClass({ | |||
placeholder: "", | |||
textarea: false, | |||
inputProps: {}, | |||
preventKeyEvents: true, |
There was a problem hiding this comment.
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();
}
Otherwise looks good. |
How about merge ? |
That would be awesome. Nothing against changing the name of the property. |
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. |
@arahansen I'll pick this up if someone sends me a PR with an updated |
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.