Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:jordanlapointe/react-autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
Mouse Braun committed Dec 10, 2018
2 parents 41388f7 + 2daeece commit 3078b06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Props passed to `props.renderInput`. By default these props will be
applied to the `<input />` element rendered by `Autocomplete`, unless you
have specified a custom value for `props.renderInput`. Any properties
supported by `HTMLInputElement` can be specified, apart from the
following which are set by `Autocomplete`: value, autoComplete, role,
following which are set by `Autocomplete`: value, role,
aria-autocomplete. `inputProps` is commonly used for (but not limited to)
placeholder, event handlers (onFocus, onBlur, etc.), autoFocus, etc..

Expand Down
9 changes: 5 additions & 4 deletions lib/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Autocomplete extends React.Component {
* applied to the `<input />` element rendered by `Autocomplete`, unless you
* have specified a custom value for `props.renderInput`. Any properties
* supported by `HTMLInputElement` can be specified, apart from the
* following which are set by `Autocomplete`: value, autoComplete, role,
* following which are set by `Autocomplete`: value, role,
* aria-autocomplete. `inputProps` is commonly used for (but not limited to)
* placeholder, event handlers (onFocus, onBlur, etc.), autoFocus, etc..
*/
Expand Down Expand Up @@ -577,12 +577,13 @@ class Autocomplete extends React.Component {
role: 'combobox',
'aria-autocomplete': 'list',
'aria-expanded': open,
autoComplete: 'off',
autoComplete: inputProps.autoComplete || 'new-password'
ref: this.exposeAPI,
onFocus: this.handleInputFocus,
onBlur: this.handleInputBlur,
onFocus: this.composeEventHandlers(this.handleInputFocus, inputProps.onFocus),
onBlur: this.composeEventHandlers(this.handleInputBlur, inputProps.onBlur),
onChange: this.handleChange,
onKeyDown: this.composeEventHandlers(this.handleKeyDown, inputProps.onKeyDown),
onKeyUp: this.composeEventHandlers(this.handleKeyUp, inputProps.onKeyUp),
onClick: this.composeEventHandlers(this.handleInputClick, inputProps.onClick),
value: this.props.value,
})}
Expand Down

0 comments on commit 3078b06

Please sign in to comment.