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

GH-217 auto complete fix #370

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 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,7 +577,7 @@ 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,
Expand Down
2 changes: 1 addition & 1 deletion lib/__tests__/__snapshots__/Autocomplete-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`Autocomplete.props.renderInput should be invoked in \`render\` to creat
Object {
"aria-autocomplete": "list",
"aria-expanded": false,
"autoComplete": "off",
"autoComplete": "new-password",
"foo": "bar",
"onBlur": [Function],
"onChange": [Function],
Expand Down
Loading