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

Commit d729fb5

Browse files
author
Mouse Braun
committed
Merge branch 'master' of github.com:jordanlapointe/react-autocomplete
2 parents 41388f7 + 2daeece commit d729fb5

File tree

4 files changed

+9173
-4
lines changed

4 files changed

+9173
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Props passed to `props.renderInput`. By default these props will be
7575
applied to the `<input />` element rendered by `Autocomplete`, unless you
7676
have specified a custom value for `props.renderInput`. Any properties
7777
supported by `HTMLInputElement` can be specified, apart from the
78-
following which are set by `Autocomplete`: value, autoComplete, role,
78+
following which are set by `Autocomplete`: value, role,
7979
aria-autocomplete. `inputProps` is commonly used for (but not limited to)
8080
placeholder, event handlers (onFocus, onBlur, etc.), autoFocus, etc..
8181

lib/Autocomplete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class Autocomplete extends React.Component {
116116
* applied to the `<input />` element rendered by `Autocomplete`, unless you
117117
* have specified a custom value for `props.renderInput`. Any properties
118118
* supported by `HTMLInputElement` can be specified, apart from the
119-
* following which are set by `Autocomplete`: value, autoComplete, role,
119+
* following which are set by `Autocomplete`: value, role,
120120
* aria-autocomplete. `inputProps` is commonly used for (but not limited to)
121121
* placeholder, event handlers (onFocus, onBlur, etc.), autoFocus, etc..
122122
*/
@@ -577,7 +577,7 @@ class Autocomplete extends React.Component {
577577
role: 'combobox',
578578
'aria-autocomplete': 'list',
579579
'aria-expanded': open,
580-
autoComplete: 'off',
580+
autoComplete: inputProps.autoComplete || 'new-password',
581581
ref: this.exposeAPI,
582582
onFocus: this.handleInputFocus,
583583
onBlur: this.handleInputBlur,

lib/__tests__/__snapshots__/Autocomplete-test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`Autocomplete.props.renderInput should be invoked in \`render\` to creat
44
Object {
55
"aria-autocomplete": "list",
66
"aria-expanded": false,
7-
"autoComplete": "off",
7+
"autoComplete": "new-password",
88
"foo": "bar",
99
"onBlur": [Function],
1010
"onChange": [Function],

0 commit comments

Comments
 (0)